crow-task-mcp 0.1.26__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ # Python-generated files
2
+ __pycache__/
3
+ *.py[oc]
4
+ build/
5
+ dist/
6
+ wheels/
7
+ *.egg-info
8
+
9
+ # Virtual environments
10
+ .venv
11
+
12
+ # keys
13
+ .env
14
+
15
+ # test database
16
+ *.db
17
+ *.db*
18
+
19
+ # MyST build output
20
+ docs/_build/
21
+ _site/
22
+
23
+ crow-editor/frontend/node_modules
24
+
25
+ *.log
26
+ *.log*
27
+
28
+
29
+ crow-mcp/.venv
30
+ crow-task-mcp/.venv
31
+ crow-task-mcp/src/crow_task_mcp/__pycache__/
32
+ crow-orchestrator-mcp/.venv
33
+ crow-orchestrator-mcp/src/crow_orchestrator_mcp/__pycache__
34
+
35
+
36
+ sandbox/lancedb-testing/pylate_lancedb/
@@ -0,0 +1 @@
1
+ 3.14
@@ -0,0 +1,42 @@
1
+ Metadata-Version: 2.4
2
+ Name: crow-task-mcp
3
+ Version: 0.1.26
4
+ Summary: Orchestration tools for agent-to-agent communication via ACP protocol
5
+ Requires-Python: >=3.14
6
+ Requires-Dist: fastmcp>=3.4.2
7
+ Description-Content-Type: text/markdown
8
+
9
+ # crow-task-mcp
10
+
11
+ Per-session orchestration tools — the "manage your own session" toolset that
12
+ **every** agent (workers and orchestrators) loads.
13
+
14
+ ## Tools
15
+
16
+ | Tool | Backend ext_method | Purpose |
17
+ |------|-------------------|---------|
18
+ | `send_prompt` | `_send` | Fire-and-forget prompt to another session. Returns immediately; retrieve the response later via `query_memory(session_id, limit=1)`. |
19
+ | `task_read` | `_task/read` | Read this session's task list. |
20
+ | `task_write` | `_task/write` | Create / update / delete tasks in this session's task list. |
21
+
22
+ ## Architecture
23
+
24
+ These are **schema-only** definitions for the LLM (`raise NotImplementedError`).
25
+ Real execution lives in `crow-cli`:
26
+
27
+ 1. `react.py` dispatches by bare tool name → `execute_orchestration_*` in `tools.py`
28
+ 2. `tools.py` calls `conn.ext_method(method=...)` over ACP
29
+ 3. The sidex client routes the ext_method to the `sidex-acp` backend
30
+ 4. Backend handler: `sidex/crates/sidex-acp/src/tools/orchestration_3.rs`
31
+
32
+ > `task_send` (batch delegation + completion callback) is **not** here — it
33
+ > lives in [`crow-orchestrator-mcp`](../crow-orchestrator-mcp) and is only
34
+ > loaded by orchestrator agents. This keeps workers from advertising a
35
+ > delegation tool they shouldn't use, and avoids a duplicate-tool-name
36
+ > collision when an orchestrator loads both servers.
37
+
38
+ ## Run
39
+
40
+ ```bash
41
+ uvx crow-task-mcp
42
+ ```
@@ -0,0 +1,34 @@
1
+ # crow-task-mcp
2
+
3
+ Per-session orchestration tools — the "manage your own session" toolset that
4
+ **every** agent (workers and orchestrators) loads.
5
+
6
+ ## Tools
7
+
8
+ | Tool | Backend ext_method | Purpose |
9
+ |------|-------------------|---------|
10
+ | `send_prompt` | `_send` | Fire-and-forget prompt to another session. Returns immediately; retrieve the response later via `query_memory(session_id, limit=1)`. |
11
+ | `task_read` | `_task/read` | Read this session's task list. |
12
+ | `task_write` | `_task/write` | Create / update / delete tasks in this session's task list. |
13
+
14
+ ## Architecture
15
+
16
+ These are **schema-only** definitions for the LLM (`raise NotImplementedError`).
17
+ Real execution lives in `crow-cli`:
18
+
19
+ 1. `react.py` dispatches by bare tool name → `execute_orchestration_*` in `tools.py`
20
+ 2. `tools.py` calls `conn.ext_method(method=...)` over ACP
21
+ 3. The sidex client routes the ext_method to the `sidex-acp` backend
22
+ 4. Backend handler: `sidex/crates/sidex-acp/src/tools/orchestration_3.rs`
23
+
24
+ > `task_send` (batch delegation + completion callback) is **not** here — it
25
+ > lives in [`crow-orchestrator-mcp`](../crow-orchestrator-mcp) and is only
26
+ > loaded by orchestrator agents. This keeps workers from advertising a
27
+ > delegation tool they shouldn't use, and avoids a duplicate-tool-name
28
+ > collision when an orchestrator loads both servers.
29
+
30
+ ## Run
31
+
32
+ ```bash
33
+ uvx crow-task-mcp
34
+ ```
@@ -0,0 +1,16 @@
1
+ [project]
2
+ name = "crow-task-mcp"
3
+ version = "0.1.26"
4
+ description = "Orchestration tools for agent-to-agent communication via ACP protocol"
5
+ readme = "README.md"
6
+ requires-python = ">=3.14"
7
+ dependencies = [
8
+ "fastmcp>=3.4.2",
9
+ ]
10
+
11
+ [project.scripts]
12
+ crow-task-mcp = "crow_task_mcp.main:main"
13
+
14
+ [build-system]
15
+ requires = ["hatchling"]
16
+ build-backend = "hatchling.build"
@@ -0,0 +1,11 @@
1
+ """
2
+ Crow Task MCP - Orchestration tools for agent-to-agent communication.
3
+
4
+ This package provides MCP tools for multi-agent workflows, enabling agents
5
+ to coordinate by sending prompts, spawning child agents, and managing sessions.
6
+ """
7
+
8
+ from .main import mcp
9
+
10
+ __version__ = "0.1.0"
11
+ __all__ = ["mcp"]
@@ -0,0 +1,152 @@
1
+ """
2
+ Crow Task MCP - Orchestration tools for agent-to-agent communication.
3
+
4
+ This MCP server provides tools that enable agents to coordinate with each other
5
+ by sending prompts and managing tasks.
6
+
7
+ Architecture:
8
+ - Tools are defined here as schemas for the LLM
9
+ - Actual execution happens in crow-cli/tools.py via ACP ext_method calls
10
+ - The client (sidex) routes ext_method calls to sidex-acp backend
11
+ - Backend methods: _send, _task/read, _task/write
12
+ - task_send (_task/send) lives in crow-orchestrator-mcp, loaded only by orchestrators
13
+
14
+ Note: Queue operations (_queue/*) are internal client logic and NOT exposed to agents.
15
+ """
16
+
17
+ from fastmcp import FastMCP
18
+
19
+ mcp = FastMCP("crow-task-mcp")
20
+
21
+
22
+ @mcp.tool()
23
+ def send_prompt(to_session_id: str, blocks: list[dict]) -> str:
24
+ """Send a prompt to another agent session.
25
+
26
+ The backend prompts the target session with your message blocks and
27
+ returns immediately. When the target finishes processing, you will
28
+ receive a notification telling you to call
29
+ `query_memory(session_id=<target_session_id>, limit=1)` to see the
30
+ result. On error, you will also be notified.
31
+
32
+ Args:
33
+ to_session_id: The session ID of the agent to send the message to.
34
+ This is a coolname-style slug, e.g.
35
+ "accurate-amethyst-salmon-from-vega".
36
+ blocks: Array of content blocks (text, image, etc.)
37
+
38
+ Returns:
39
+ Status message ("sent"); the result is delivered via a
40
+ completion notification, then fetched via query_memory
41
+ """
42
+ raise NotImplementedError(
43
+ "Orchestration tools are executed by crow-cli via ACP ext_method. "
44
+ "This schema is for LLM tool selection only."
45
+ )
46
+
47
+
48
+ @mcp.tool()
49
+ def task_read() -> dict:
50
+ """Read the task list for the current session.
51
+
52
+ Returns:
53
+ Dictionary with tasks array and summary string
54
+ """
55
+ raise NotImplementedError(
56
+ "Orchestration tools are executed by crow-cli via ACP ext_method. "
57
+ "This schema is for LLM tool selection only."
58
+ )
59
+
60
+
61
+ @mcp.tool()
62
+ def task_write(todos: list[dict]) -> dict:
63
+ """Wholesale-replace the session's task list with a new set of todos.
64
+
65
+ This is your working memory AND your delegation mechanism for your future
66
+ self. Each call replaces the entire list — regenerate the full list with
67
+ updated statuses each time (like OpenCode's TodoWrite). No CRUD actions,
68
+ no action field.
69
+
70
+ ## How updating works
71
+
72
+ You always send the COMPLETE list, never a delta. To mark a task done,
73
+ copy the whole current list and change that one task's status to
74
+ "completed". To add a task, append it. To drop one, omit it. Every call
75
+ generates fresh IDs internally, so never try to address a task by its ID
76
+ across calls — just reproduce the list with the statuses you want.
77
+
78
+ ## How the list keeps the session going
79
+
80
+ The orchestration loop runs after each of your turns. It reads the list
81
+ and decides what to prompt you with next:
82
+
83
+ - If the current (in_progress) task is done, it promotes the next
84
+ pending task and hands it to you as your new focus.
85
+ - If the current task is NOT done at the end of a turn, you get
86
+ NAGGED: a message lists every still-incomplete task (pending or
87
+ in_progress) and tells you to call task_write to update statuses.
88
+ This nag fires every turn you leave work unfinished — it is the
89
+ loop's way of refusing to let you forget what is not done.
90
+ - The loop only stops (and the session only ends) when there are no
91
+ pending or in_progress tasks left — i.e. the list is empty or every
92
+ task is completed/failed/cancelled.
93
+
94
+ So the list is what keeps you alive and on-task: as long as there is
95
+ unfinished work in it, the loop will keep feeding you the next thing or
96
+ nagging you about what's left. An empty list is the only signal that the
97
+ session is truly done.
98
+
99
+ ## Delegate to your future self — one task per turn
100
+
101
+ The list lets you offload a large body of work onto your future self so
102
+ you can focus on the single task at hand. Lay out the whole plan up
103
+ front: a long list of many tasks, one marked "in_progress" and the rest
104
+ "pending". Then work ONLY on the in_progress task for that turn.
105
+
106
+ Do NOT try to burn through the entire list in a single turn. Do one
107
+ task, mark it "completed" via task_write, and end your turn. The loop
108
+ then promotes the next pending task and hands it to you as the new
109
+ focus — or, if you ended the turn with the current task still
110
+ incomplete, it nags you with the full list of unfinished work. This
111
+ turn-by-turn cadence is by design: it keeps each turn focused, keeps
112
+ context manageable, and lets the orchestration layer track real
113
+ progress instead of one giant turn. Let the nag/advance fire between
114
+ tasks; that is the mechanism doing its job.
115
+
116
+ ## Clearing the list when done
117
+
118
+ When a body of work is finished — all tasks are completed/failed/
119
+ cancelled and there is nothing left — write an empty list to clear it:
120
+
121
+ task_write(todos=[])
122
+
123
+ An empty list tells the orchestration layer the session is done. The
124
+ task loop exits, and if this session was delegated to via _task/send,
125
+ the caller is notified to pick up results. Completed tasks left sitting
126
+ in the list are noise — they make it harder to see what's pending and
127
+ they keep the loop alive when it should have exited. Don't accumulate
128
+ history; clear the list when the work is done.
129
+
130
+ Args:
131
+ todos: Array of todo objects, each with:
132
+ - content (required): Brief description of the task
133
+ - status: "pending", "in_progress", "completed", "failed", "cancelled"
134
+ - priority: "high", "medium", "low"
135
+ Pass an empty array to clear the list when all work is done.
136
+
137
+ Returns:
138
+ Dictionary with the updated tasks array
139
+ """
140
+ raise NotImplementedError(
141
+ "Orchestration tools are executed by crow-cli via ACP ext_method. "
142
+ "This schema is for LLM tool selection only."
143
+ )
144
+
145
+
146
+ def main():
147
+ """Entry point for the MCP server."""
148
+ mcp.run()
149
+
150
+
151
+ if __name__ == "__main__":
152
+ main()