356 Commits

Author SHA1 Message Date
sean-esk
ecaece460c Merge pull request #852 from coleam00/feature/openrouter-embeddings-support
Add OpenRouter Embeddings Support
2025-11-29 14:24:10 -05:00
Jason Pickens
9bb16831fa Update README for Supabase service role key instructions (#836) 2025-11-24 10:54:24 +02:00
sean-eskerium
7e66f34c18 Merge pull request #849 from coleam00/feature/remove-docusaurus-documentation
Remove Docusaurus documentation system
2025-11-12 14:32:12 -05:00
leex279
b4b534b544 Add comprehensive API response validation in discoverModels
Enhanced validation to catch malformed responses early:
- Validate total_count is non-negative number
- Verify total_count matches embedding_models.length
- Validate first model has required fields (id, provider, dimensions)
- Check dimensions are positive numbers
- Validate provider names are from expected set
- Provide specific error messages for each validation failure

Prevents caching invalid data and provides better debugging information.

Addresses CodeRabbit nitpick comment on PR #852

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 00:06:43 +01:00
leex279
7f10527a3d Add robust cache validation with type guards in openrouterService
Implemented comprehensive validation to prevent crashes from corrupted cache:
- Created isCacheEntry() type guard to validate cache structure
- Parse JSON into unknown type (TypeScript strict mode compliant)
- Validate timestamp is number and data has OpenRouterModelListResponse shape
- Validate each model has all required fields with correct types
- Remove corrupted cache entries to avoid repeated failures
- No 'any' types used, full strict mode compliance

Prevents crashes from malformed cache data while maintaining type safety.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-09 00:03:43 +01:00
DIY Smart Code
038b00d275 Delete PRPs/openrouter-embeddings-support.md 2025-11-08 23:57:24 +01:00
leex279
4d2851cb2f Address CodeRabbit review: Improve openrouterService robustness
1. Lazy initialization of baseUrl via getBaseUrl() method
   - Allows API URL to be updated at runtime without stale URL issues

2. Runtime validation of API response structure
   - Validates embedding_models array exists before caching
   - Prevents invalid responses from being cached

Addresses CodeRabbit nitpick comments on PR #852

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 23:38:01 +01:00
leex279
71fbae575b Fix credential_service to recognize OpenRouter as embedding provider
Added 'openrouter' to embedding_capable_providers set in credential_service.py
to prevent it from being rejected and falling back to OpenAI.

Fixes: 'Invalid embedding provider openrouter doesn't support embeddings' error

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 23:36:13 +01:00
leex279
f32f0c36dd Fix embedding provider grid to fit all providers in one line
Changed grid-cols-3 to grid-cols-4 for embedding provider selection
so all 4 embedding-capable providers (OpenAI, Google, OpenRouter, Ollama)
fit on one line, matching the chat provider layout.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 23:28:30 +01:00
leex279
4cfa872f7b Add unit tests for OpenRouter model discovery
Tests cover:
- Model list validation (non-empty, valid types)
- Provider prefix validation (all models have provider/)
- Data validation (positive dimensions, non-negative pricing)
- Provider validation (valid provider names)
- Specific provider models (OpenAI, Qwen)
- Model ID validation (requires prefix)

All 11 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 23:21:43 +01:00
leex279
44bbcfcafb Add OpenRouter embeddings support
Implements OpenRouter as an embedding provider option, enabling access to multiple
embedding models (OpenAI, Google Gemini, Qwen3, Mistral) through a single API key.

Backend changes:
- Add validate_openrouter_api_key() for API key validation (sk-or-v1- format)
- Add OpenRouterErrorAdapter for error sanitization
- Add openrouter to valid providers in llm_provider_service
- Create openrouter_discovery_service with hardcoded model list
- Create /api/openrouter/models endpoint for model discovery
- Register OpenRouter router in FastAPI main app

Frontend changes:
- Create openrouterService.ts for model discovery API client
- Add OpenRouter to RAGSettings.tsx provider options
- Configure default models with provider prefix (openai/text-embedding-3-small)
- Add OpenRouter to embedding-capable providers list

Documentation:
- Update .env.example with OPENROUTER_API_KEY documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 23:06:31 +01:00
DIY Smart Code
4ebdeda2f5 Merge pull request #850 from coleam00/fix/mcp-http-health-endpoint
Fix: Add HTTP health endpoint to MCP server
2025-11-08 22:52:23 +01:00
leex279
4620cfa8d6 Fix: Address CodeRabbit suggestions for health endpoint
- Use context.startup_time for consistent uptime tracking
  - Prefer context.startup_time when available (matches MCP health_check tool)
  - Fallback to module-level _server_start_time during startup
- Add exc_info=True to exception logging for full stack traces
  - Follows coding guidelines for error message preservation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 22:34:09 +01:00
leex279
c0190e90c9 Fix MCP server HTTP health endpoint for monitoring
Add missing HTTP /health endpoint to MCP server to support the
HTTP-based health monitoring system introduced in commit 987c874.

Background:
After removing Docker socket monitoring for security (CVE-2025-9074),
the backend API switched to HTTP health checks. However, the MCP
server only exposed MCP tools via the MCP protocol, causing 404
errors when the API tried to check /health.

Changes:
- Add Starlette Request/JSONResponse imports for HTTP handling
- Implement http_health_endpoint() async function
- Track server uptime using module-level _server_start_time
- Register /health endpoint using FastMCP's custom_route decorator
- Return proper JSON response with success, status, uptime_seconds

Response format:
{
  "success": true,
  "status": "ready",
  "uptime_seconds": <number>,
  "timestamp": "<ISO timestamp>"
}

Testing:
- Direct endpoint: curl http://localhost:8051/health
- Via API: curl http://localhost:8181/api/mcp/status
- UI MCP Status Dashboard now displays properly

Fixes: MCP server 404 errors and UI error state

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 20:45:04 +01:00
leex279
49e8db9794 Remove Docusaurus documentation system
Remove the standalone Docusaurus documentation website to simplify the project structure and reduce maintenance overhead.

Changes:
- Delete /docs directory (480MB freed) containing all Docusaurus files
- Remove docker-compose.docs.yml (optional docs service)
- Remove ARCHON_DOCS_PORT from .env.example
- Update .github/workflows/release-notes.yml (remove docs section)
- Update .github/test-release-notes.sh (remove docs section)

Preserved:
- Project documents feature (archon-ui-main/src/features/projects/documents/)
- Backend document service (python/src/server/services/projects/document_service.py)
- Project documents API endpoints (/api/projects/{id}/docs)

Benefits:
- Eliminates redundancy (content duplicated in /PRPs/ai_docs/)
- Reduces complexity (removes 480MB dependencies and configuration)
- Simplifies deployment (eliminates optional Docker service on port 3838)
- Lowers maintenance burden (single documentation source)

All validation tests passed:
✓ File system validation
✓ Backend imports verification
✓ Docker Compose integration testing
✓ CI/CD workflow validation
✓ Project documents API still functional

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-08 18:31:17 +01:00
DIY Smart Code
33f1db303e Removed Doc-Container mentions
documentation container isnt available anymore / will be removed
2025-11-07 20:39:57 +01:00
DIY Smart Code
987c874394 Merge pull request #834 from coleam00/security/remove-docker-socket-risk
Security: Remove Docker socket mounting to eliminate CVE-2025-9074 risk
2025-11-06 08:45:50 +01:00
leex279
f85dbe0b25 Fix zero uptime handling in HTTP health check
- Change uptime_seconds check from falsy to "is not None"
- Preserve 0 uptime for freshly-launched MCP servers
- Add test case for zero uptime edge case

Bug: Previously treated 0 as falsy, returning None instead of 0
Fix: Only return None when uptime_seconds is actually None

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-03 00:11:13 +01:00
leex279
23302577a3 Security: Remove Docker socket mounting to eliminate CVE-2025-9074 risk
- Replace Docker socket-based MCP status monitoring with HTTP health checks
- Remove Docker socket volume mount from docker-compose.yml (CVE-2025-9074 - CVSS 9.3)
- Add MCPMonitoringConfig for secure-by-default HTTP mode
- Make docker dependency optional in pyproject.toml
- Add ENABLE_DOCKER_SOCKET_MONITORING env var for backward compatibility
- Implement get_container_status_http() using httpx for health checks
- Add comprehensive test suite (13 tests, 100% passing)
- Update .env.example with security documentation

Security Benefits:
- Eliminates root-equivalent host access vulnerability
- Prevents container escape attacks
- Portable across Docker, Kubernetes, and bare metal
- Defaults to secure mode, legacy Docker mode optional

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 23:22:34 +01:00
DIY Smart Code
6baa669f01 Merge pull request #833 from coleam00/add-branch-selection-bug-template
Add branch selection to bug report template
2025-11-02 22:57:32 +01:00
leex279
5ba58734fb Add branch selection to bug report template
Added a dropdown field to allow bug reporters to specify which branch they are using (stable or main), with stable as the default. This will help with debugging and tracking branch-specific issues.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 22:18:57 +01:00
sean-eskerium
844cdb3551 Merge pull request #831 from coleam00/ui/agent-work-order
UI/agent work order
2025-11-01 08:13:05 -04:00
sean-eskerium
d539a05482 Update unit tests 2025-10-31 23:22:05 -04:00
sean-eskerium
068018a6a3 Update work order table to show branch name, and the commit operations count bug that is showing commits of the whole main branch vs. the work order changes. 2025-10-31 22:42:00 -04:00
sean-eskerium
a292ce2dfb Code review updates and moving the prp-review step to before the Commit. 2025-10-31 22:21:40 -04:00
sean-eskerium
ea88d754d4 code review cleanup 2025-10-31 10:32:14 -04:00
sean-eskerium
7eabeebe5f Updates to UI consistency, and after the event is completed, a message to view the details since the execution history was completed, since the full logs don't persist. 2025-10-26 09:35:47 -04:00
sean-eskerium
54a17c07d6 Implement State Management with Zustand, SSE, and remove polling. 2025-10-25 23:12:09 -04:00
sean-eskerium
28aa3ac76d Refactor the UI is working, work in progress. Zustand next to work better with SSE. 2025-10-25 21:50:12 -04:00
sean-eskerium
4025f88ee9 Updates to get Docker working and adding Claude OAUTH token variable, and finish of the style guide mockup. 2025-10-25 16:29:53 -04:00
sean-eskerium
95791456cd Merge remote-tracking branch 'origin/feat/agent_work_orders' into ui/agent-work-order 2025-10-25 14:32:33 -04:00
sean-eskerium
68afb2c584 Updates to style guid awo 2025-10-25 14:31:52 -04:00
sean-eskerium
62868705ca Layout changes, before bringing in the awo branch 2025-10-25 14:23:47 -04:00
Rasmus Widing
bd6613014b feat: add supabase persistence for agent work orders 2025-10-24 20:37:57 +03:00
Rasmus Widing
71393520dc feat: add repository configuration system with defensive validation
- Add archon_configured_repositories table migration with production-ready sandbox type constraints
- Implement SupabaseWorkOrderRepository for CRUD operations with comprehensive error handling
- Add defensive validation in _row_to_model with detailed logging for invalid enum values
- Implement granular exception handling (409 duplicates, 422 validation, 502 GitHub API errors)
- Document async/await pattern for interface consistency across repository implementations
- Add Supabase health check to verify table existence
- Expand test coverage from 10 to 17 tests with error handling and edge case validation
- Add supabase dependency to agent-work-orders group
- Enable ENABLE_AGENT_WORK_ORDERS flag in docker-compose for production deployment
2025-10-24 20:01:15 +03:00
Rasmus Widing
6a8e784aab feat: make agent work orders an optional feature
Add ENABLE_AGENT_WORK_ORDERS configuration flag to allow disabling the agent work orders microservice. Service discovery now gracefully handles unavailable services, and health checks return appropriate status when feature is disabled.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 15:56:34 +03:00
Rasmus Widing
acf1fcc21d feat: add real-time logs and stats for agent work orders
- Add WorkOrderLogsPanel with SSE streaming support
- Add RealTimeStats component for live metrics
- Add useWorkOrderLogs hook for SSE log streaming
- Add useLogStats hook for real-time statistics
- Update WorkOrderDetailView to display logs panel
- Add comprehensive tests for new components
- Configure Vite test environment
2025-10-24 00:54:50 +03:00
Rasmus Widing
97f7d8ef27 chore: move sse-starlette to agent-work-orders dependency group
- Move sse-starlette from base dependencies to agent-work-orders group
- Keep structlog in agent-work-orders group (already there)
- Update lockfile accordingly
2025-10-24 00:08:32 +03:00
Rasmus Widing
8728c67448 fix: linting issues in agent work orders tests
- Sort imports consistently
- Remove unused imports (pytest, MagicMock, patch, etc.)
- Update to datetime.UTC alias from timezone.utc
- Fix formatting and organization issues
2025-10-24 00:07:32 +03:00
Rasmus Widing
d80a12f395 refactor: port allocation from dual ports to flexible port ranges
- Change from fixed backend/frontend ports to 10-port ranges per work order
- Support 20 concurrent work orders (200 ports: 9000-9199)
- Add port availability checking with flexible allocation
- Make git_worktree default sandbox type
- Standardize API routes with /api/ prefix
- Add comprehensive port allocation tests
- Update environment file generation with PORT_0-PORT_9 variables
- Maintain backward compatibility with BACKEND_PORT/FRONTEND_PORT aliases
2025-10-23 23:17:43 +03:00
Rasmus Widing
799d5a9dd7 Revert "chore: remove example workflow directory"
This reverts commit c2a568e08c.
2025-10-23 22:38:46 +03:00
Rasmus Widing
c2a568e08c chore: remove example workflow directory 2025-10-23 22:37:15 +03:00
sean-eskerium
5b98adc1e4 Fixes after running UI consistency 2025-10-23 09:38:21 -04:00
sean-eskerium
ef8f725da7 UI for Agent Work Orders 2025-10-23 09:32:49 -04:00
sean-eskerium
a378c43cee Merge pull request #810 from coleam00/fix/bug-report-repository-url
fix: Update bug report to use centralized repository configuration
2025-10-23 06:58:39 -04:00
Rasmus Widing
b1a5c06844 feat: add github authentication for agent work orders pr creation 2025-10-23 12:57:12 +03:00
Rasmus Widing
f14157a1b6 chore: remove e2e test results file 2025-10-23 12:47:27 +03:00
Rasmus Widing
f07cefd1a1 feat: add agent work orders microservice with hybrid deployment 2025-10-23 12:46:57 +03:00
DIY Smart Code
68fb4a8866 Merge pull request #622 from coleam00/feature/automatic-discovery-llms-sitemap-430
feat: Implement priority-based automatic discovery of llms.txt and sitemap.xml files
2025-10-19 16:09:24 +02:00
leex279
35c9ea9080 fix: update test to use 'pages' terminology for llms.txt
Aligns test expectations with the llms.txt specification which uses
'pages' rather than 'files' terminology. The implementation correctly
uses "llms_txt_with_linked_pages" - this updates the test to match.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-19 16:02:39 +02:00