Skip to content

feat: add background jobs and queued task execution (#10)#23

Merged
smallnest merged 4 commits intomasterfrom
feature/issue-10
Apr 3, 2026
Merged

feat: add background jobs and queued task execution (#10)#23
smallnest merged 4 commits intomasterfrom
feature/issue-10

Conversation

@smallnest
Copy link
Copy Markdown
Owner

Summary

  • Add Job Manager for background task execution
  • Support job submission, query, cancel, delete
  • Add REST API and JSON-RPC API
  • Add comprehensive documentation

Test plan

  • Job submission and execution
  • Job status query
  • Job cancellation
  • Job listing
  • API documentation added

Related Issues

chaoyuepan added 4 commits April 3, 2026 16:37
- source ~/.zshrc caused script to exit due to interactive commands
- Now only extract OPENROUTER_API_KEY, OPENAI_API_KEY, ANTHROPIC_API_KEY
- Use grep + eval instead of source to avoid side effects
- Document Job status and lifecycle
- Add REST API endpoints with examples
- Add JSON-RPC API usage
- Include curl, Python, JavaScript examples
- Document Job data structure and state transitions
Implements #10 - Background jobs and queued task execution

- Add Job Manager with full lifecycle management
- Support job submission, query, cancel, delete operations
- Add REST API: POST/GET/DELETE /api/jobs
- Add JSON-RPC API: job.submit, job.get, job.list, job.cancel, job.delete
- Add Job status: queued, running, completed, failed, canceled
- Add log entries for job execution tracking
- Add comprehensive unit tests

Job data structure:
- ID, Status, Prompt, AgentName
- CreatedAt, StartedAt, FinishedAt
- Result, Error, Logs

State transitions:
- queued -> running -> completed/failed/canceled
- failed -> queued (allow retry)
@smallnest smallnest merged commit 141ad16 into master Apr 3, 2026
1 check failed
@smallnest smallnest deleted the feature/issue-10 branch April 3, 2026 09:09
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.

feat: add background jobs and queued task execution

1 participant