mirror of
https://github.com/rennf93/roboco.git
synced 2026-08-03 07:23:24 +02:00
Major feature: Sessions are now linked to tasks with smart routing and context loading, ensuring agents have proper discussion context.
## Session-Task Relationship (Many-to-Many)
- Added SessionTaskTable junction table linking sessions to tasks
- Sessions can link to multiple tasks, tasks can have multiple sessions
- is_primary flag marks the main discussion session for a task
- relationship_type: discussion, planning, review, retrospective
- Subtasks auto-inherit parent task's session
## BACKLOG Status + Activation Flow
- Tasks now created with BACKLOG status (not PENDING)
- PMs must create session BEFORE activating task
- roboco_task_activate() transitions BACKLOG → PENDING
- Prevents race condition where dev starts before session exists
- Flow: CREATE (backlog) → SESSION → ACTIVATE (pending) → spawn
## Session Scopes
- SessionScope enum: initiative, cell, task
- initiative: Cross-cell coordination (Main PM, #dev-all)
- cell: Cell-specific work (Cell PM default)
- task: Individual task execution (dev level)
- Enables future smart context loading by scope
## Message Routing to Task Sessions
- When task_id provided in roboco_message_send(), routes to task's primary session instead of channel's active session
- New API endpoint: GET /sessions/for-task/{task_id}
- TaskResponse now includes linked sessions array
## Dev Session Access
- New tool: roboco_session_history_for_task(task_id)
- Devs can now see their task's discussion history
- Messages tagged with task_id for filtering
## Communication Guidelines
- Added "When to Post / When NOT to Post" to all 9 agent blueprints
- Devs/QA/Doc should use task tools for status, journal for reasoning
- Sessions reserved for coordination that needs response
- Reduces noise: no "Starting work" or "Made progress" chat messages
Files changed:
- DB: SessionTaskTable, SessionScope column
- Services: messaging.py (linking), task.py (activation)
- MCP: 5 new session tools, message routing update
- API: session-task endpoints, TaskResponse sessions
- Blueprints: All 13 updated with session/activation workflow
71 lines
1.8 KiB
Python
71 lines
1.8 KiB
Python
"""
|
|
Task MCP Handlers
|
|
|
|
Exports all task handlers for the Task MCP server.
|
|
"""
|
|
|
|
from roboco.mcp.tasks.handlers.blocking import (
|
|
handle_task_block,
|
|
handle_task_pause,
|
|
handle_task_unblock,
|
|
)
|
|
from roboco.mcp.tasks.handlers.claim import handle_task_claim
|
|
from roboco.mcp.tasks.handlers.lifecycle import (
|
|
handle_agent_idle,
|
|
handle_docs_complete,
|
|
handle_task_cancel,
|
|
handle_task_complete,
|
|
)
|
|
from roboco.mcp.tasks.handlers.management import (
|
|
handle_task_activate,
|
|
handle_task_assign,
|
|
handle_task_create,
|
|
handle_task_escalate,
|
|
)
|
|
from roboco.mcp.tasks.handlers.review import (
|
|
handle_task_qa_fail,
|
|
handle_task_qa_pass,
|
|
handle_task_submit_qa,
|
|
handle_task_submit_verification,
|
|
)
|
|
from roboco.mcp.tasks.handlers.scan import handle_task_get, handle_task_scan
|
|
from roboco.mcp.tasks.handlers.sessions import (
|
|
handle_session_create_for_tasks,
|
|
handle_session_get_for_task,
|
|
handle_session_link_task,
|
|
handle_session_unlink_task,
|
|
)
|
|
from roboco.mcp.tasks.handlers.work import (
|
|
handle_task_plan,
|
|
handle_task_progress,
|
|
handle_task_start,
|
|
)
|
|
|
|
__all__ = [
|
|
"handle_agent_idle",
|
|
"handle_docs_complete",
|
|
"handle_session_create_for_tasks",
|
|
"handle_session_get_for_task",
|
|
"handle_session_link_task",
|
|
"handle_session_unlink_task",
|
|
"handle_task_activate",
|
|
"handle_task_assign",
|
|
"handle_task_block",
|
|
"handle_task_cancel",
|
|
"handle_task_claim",
|
|
"handle_task_complete",
|
|
"handle_task_create",
|
|
"handle_task_escalate",
|
|
"handle_task_get",
|
|
"handle_task_pause",
|
|
"handle_task_plan",
|
|
"handle_task_progress",
|
|
"handle_task_qa_fail",
|
|
"handle_task_qa_pass",
|
|
"handle_task_scan",
|
|
"handle_task_start",
|
|
"handle_task_submit_qa",
|
|
"handle_task_submit_verification",
|
|
"handle_task_unblock",
|
|
]
|