Skip to content

Conversation

@RichardHightower
Copy link
Contributor

Summary

  • Implements server-side job queue with JSONL persistence and file locking
  • Adds CLI agent-brain jobs command with --watch option for live monitoring
  • Adds runtime.json auto-discovery for CLI to automatically find server URL
  • Bumps version to 3.0.0 (major version for API contract change)
  • Removes --daemon flag (server backgrounds by default)

Changes

Server-Side Job Queue

  • JobQueueStore with JSONL persistence and file locking
  • JobWorker background processor with timeout handling
  • JobQueueService with deduplication and backpressure
  • New endpoints: GET/DELETE /index/jobs/, GET /index/jobs/{id}

CLI Jobs Command

  • agent-brain jobs - List all jobs in queue
  • agent-brain jobs --watch - Watch queue with live Rich table updates
  • agent-brain jobs JOB_ID - Show detailed job information
  • agent-brain jobs JOB_ID --cancel - Cancel a pending or running job

Runtime Autodiscovery

  • CLI config module reads runtime.json for automatic server URL discovery
  • Foreground mode now writes runtime.json before exec
  • Config resolution order: AGENT_BRAIN_URL > runtime.json > config.yaml > default:8000

Breaking Changes

  • POST /index now returns 202 Accepted with job_id (was blocking)
  • POST /index/add now returns 202 Accepted with job_id

Documentation

  • Add docs/CHANGELOG.md with v3.0.0 release notes
  • Add scripts/local_integration_check.sh for E2E validation
  • Update docs/USER_GUIDE.md with Job Queue, Runtime Autodiscovery sections
  • Update docs/API_REFERENCE.md with Job Queue endpoints

Test Plan

  • All 342 server tests pass
  • All 74 CLI tests pass
  • Version tests updated for 3.0.0
  • Run task local-integration to validate E2E workflow
  • Verify agent-brain jobs command works
  • Verify agent-brain jobs --watch shows live updates

Known Test Baselines

  • Server tests: 342 pass
  • CLI tests: 74 pass

🤖 Generated with Claude Code

RichardHightower and others added 6 commits February 3, 2026 20:25
Server-side job queue:
- JobQueueStore with JSONL persistence and file locking
- JobWorker background processor with timeout handling
- JobQueueService with deduplication and backpressure
- /index/jobs endpoints (list, get, cancel)
- CLI jobs command with --watch option

Runtime autodiscovery:
- CLI config module reads runtime.json for server URL
- Foreground mode now writes runtime.json before exec
- Fixed race condition: locking.py no longer deletes runtime.json

Integration & docs:
- scripts/local_integration_check.sh for E2E validation
- Updated installing-local skill with mandatory cache deletion
- No --daemon flag (server backgrounds by default)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Version bump across all packages:
- agent-brain-server: 3.0.0
- agent-brain-cli: 3.0.0
- agent-brain-plugin: 3.0.0

Documentation updates:
- Add docs/CHANGELOG.md with v3.0.0 release notes
- Add scripts/local_integration_check.sh for E2E validation
- Add Job Queue section to docs/USER_GUIDE.md
- Add Runtime Autodiscovery section to docs/USER_GUIDE.md
- Add Local Integration Check section to docs/USER_GUIDE.md
- Add Job Queue endpoints to docs/API_REFERENCE.md
- Add task local-integration to Taskfile.yml

Test fixes for version 3.0.0:
- Update version assertions in server and CLI tests
- Fix config isolation in test_config.py (mock _find_config_file)
- Update locking test: runtime.json no longer deleted (intentional)
- Update similarity_threshold default test (0.7 -> 0.3)
- Use __version__ constant in FastAPI app config

Code fixes:
- Use __version__ in root endpoint instead of hardcoded version
- Use __version__ in FastAPI app initialization

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changed CLI dependency from PyPI version reference to local path
reference to fix CI build failures when version 3.0.0 isn't published
to PyPI yet.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Renamed agent_brain_server/queue to agent_brain_server/job_queue to
avoid conflict with Python's built-in queue module. This conflict caused
Poetry import errors during CI installation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixed ruff I001 import sorting errors after renaming queue to job_queue.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixed ruff I001 import sorting in main.py and jobs.py routers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@RichardHightower RichardHightower merged commit 222e271 into main Feb 4, 2026
1 check passed
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.

2 participants