taskflow-agent 0.2.2__tar.gz → 0.4.0__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.
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/.gitignore +1 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/PKG-INFO +91 -35
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/README.md +90 -34
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/pyproject.toml +1 -1
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/src/server.py +36 -2
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/src/web.py +295 -10
- taskflow_agent-0.4.0/src/workflows.py +138 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/static/index.html +271 -5
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/LICENSE +0 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/Makefile +0 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/src/__init__.py +0 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/src/db.py +0 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/src/importer.py +0 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/src/models.py +0 -0
- {taskflow_agent-0.2.2 → taskflow_agent-0.4.0}/src/repos.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: taskflow-agent
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Lightweight project and task manager with MCP tools for Claude Code
|
|
5
5
|
Project-URL: Repository, https://github.com/henrysouchien/taskflow-agent
|
|
6
6
|
Author: Henry Chien
|
|
@@ -31,31 +31,92 @@ SQLite backend, 23+ MCP tools, web UI with embedded AI chat, and a FastAPI REST
|
|
|
31
31
|
|
|
32
32
|
## Features
|
|
33
33
|
|
|
34
|
-
- **23+ MCP tools** — projects, tasks, sections, goals, daily focus, search, views, repo integration
|
|
34
|
+
- **23+ MCP tools** — projects, tasks, sections, goals, daily focus, search, views, repo integration
|
|
35
35
|
- **Web UI** — dark-theme SPA with project boards, task details, inline editing
|
|
36
36
|
- **AI chat** — embedded Claude chat with workspace awareness, tool access, and persistent memory
|
|
37
37
|
- **Daily focus** — Today view with goals, focus list, and AI-assisted daily planning
|
|
38
38
|
- **Goals** — timeframe-scoped goals (day/week/month/quarter) that guide daily prioritization
|
|
39
|
-
- **Agent memory** — persistent context across chat sessions
|
|
39
|
+
- **Agent memory** — persistent context across chat sessions
|
|
40
40
|
- **Repo integration** — read-only git status, recent commits, and TODOs across connected repos
|
|
41
41
|
- **FTS search** — full-text search across task names and notes
|
|
42
|
-
- **Server-side chat storage** — chat history persisted in SQLite with compaction
|
|
43
42
|
- **Asana import** — bulk import from Asana CSV exports
|
|
44
|
-
- **Service management** — start/stop the web server via MCP tools or Makefile
|
|
45
43
|
|
|
46
44
|
## Quick Start
|
|
47
45
|
|
|
48
46
|
```bash
|
|
49
|
-
pip install -
|
|
47
|
+
pip install taskflow-agent[web]
|
|
50
48
|
|
|
51
49
|
# Start the MCP server (for Claude Code)
|
|
52
50
|
taskflow
|
|
53
51
|
|
|
54
|
-
# Start the web UI
|
|
55
|
-
|
|
56
|
-
taskflow-web # via CLI
|
|
52
|
+
# Start the web UI (port 8787)
|
|
53
|
+
taskflow-web
|
|
57
54
|
```
|
|
58
55
|
|
|
56
|
+
## Setup
|
|
57
|
+
|
|
58
|
+
### 1. Environment
|
|
59
|
+
|
|
60
|
+
Create a `.env` file in your working directory:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# Auth — pick one mode
|
|
64
|
+
ANTHROPIC_AUTH_MODE=api_key # "oauth" or "api_key"
|
|
65
|
+
ANTHROPIC_API_KEY=sk-ant-... # if using api_key mode
|
|
66
|
+
ANTHROPIC_AUTH_TOKEN=... # if using oauth mode
|
|
67
|
+
|
|
68
|
+
# Optional
|
|
69
|
+
ANTHROPIC_MODEL=claude-sonnet-4-6 # default model for chat
|
|
70
|
+
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The MCP server (task management tools) works without auth. Auth is only needed for the web UI's embedded AI chat.
|
|
74
|
+
|
|
75
|
+
### 2. Register MCP Server
|
|
76
|
+
|
|
77
|
+
Add to `~/.claude.json`:
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"taskflow": {
|
|
83
|
+
"type": "stdio",
|
|
84
|
+
"command": "path/to/venv/bin/python",
|
|
85
|
+
"args": ["-m", "src.server"],
|
|
86
|
+
"cwd": "path/to/taskflow"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 3. Configure Repos (optional)
|
|
93
|
+
|
|
94
|
+
Create `data/repos.json` to connect git repos for status tracking:
|
|
95
|
+
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"my-project": "/absolute/path/to/my-project",
|
|
99
|
+
"another-repo": "/absolute/path/to/another-repo"
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`tf_repo_list` and `tf_repo_status` use this to show branch, state, recent commits, and TODOs. Read-only.
|
|
104
|
+
|
|
105
|
+
### 4. Run
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Web UI
|
|
109
|
+
taskflow-web # port 8787
|
|
110
|
+
# or with make (if developing from source):
|
|
111
|
+
make serve # foreground
|
|
112
|
+
make dev # with auto-reload
|
|
113
|
+
|
|
114
|
+
# MCP server only
|
|
115
|
+
taskflow
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Open `http://localhost:8787`.
|
|
119
|
+
|
|
59
120
|
## MCP Tools
|
|
60
121
|
|
|
61
122
|
### Projects
|
|
@@ -123,41 +184,36 @@ taskflow-web # via CLI
|
|
|
123
184
|
| `tf_serve_start` | Start web server in background |
|
|
124
185
|
| `tf_serve_stop` | Stop web server |
|
|
125
186
|
|
|
126
|
-
##
|
|
187
|
+
## Embedded Chat
|
|
127
188
|
|
|
128
|
-
|
|
189
|
+
The web UI includes an AI chat panel (toggle with `C`) powered by [ai-agent-gateway](https://pypi.org/project/ai-agent-gateway/).
|
|
129
190
|
|
|
130
|
-
|
|
131
|
-
{
|
|
132
|
-
"mcpServers": {
|
|
133
|
-
"taskflow": {
|
|
134
|
-
"type": "stdio",
|
|
135
|
-
"command": "path/to/venv/bin/python",
|
|
136
|
-
"args": ["-m", "src.server"],
|
|
137
|
-
"cwd": "path/to/taskflow"
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
## Web UI
|
|
191
|
+
### What the chat agent can do
|
|
144
192
|
|
|
145
|
-
|
|
193
|
+
- All `tf_*` tools — manage projects, tasks, goals, focus
|
|
194
|
+
- `read_file` / `list_dir` / `run_shell` — filesystem access
|
|
195
|
+
- `notes_search` / `notes_read` — Apple Notes integration
|
|
196
|
+
- `tf_memory_read` / `tf_memory_update` — persistent memory across sessions (stored in `data/agent_memory.md`, 12 KB max)
|
|
197
|
+
- `load_tools` — dynamically load any MCP server from `~/.claude.json` on demand
|
|
146
198
|
|
|
147
|
-
|
|
148
|
-
make serve # foreground, Ctrl-C to stop
|
|
149
|
-
make dev # with auto-reload
|
|
150
|
-
make status # check if running
|
|
151
|
-
make stop # stop the server
|
|
152
|
-
```
|
|
199
|
+
### Deferred MCP Servers
|
|
153
200
|
|
|
154
|
-
|
|
201
|
+
The chat agent can load any `stdio`-type MCP server registered in your `~/.claude.json` on demand. The agent calls `load_tools("server-name")` and gains access to that server's tools for the session.
|
|
155
202
|
|
|
156
203
|
## Database
|
|
157
204
|
|
|
158
|
-
SQLite with WAL mode.
|
|
205
|
+
SQLite with WAL mode. Created automatically on first run.
|
|
206
|
+
|
|
207
|
+
Tables: `projects`, `sections`, `tasks`, `tags`, `task_tags`, `tasks_fts` (FTS5), `goals`, `daily_focus`, `chat_messages`.
|
|
208
|
+
|
|
209
|
+
## Asana Import
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Via MCP tool:
|
|
213
|
+
tf_import_asana directory=/path/to/Asana-Export/
|
|
214
|
+
```
|
|
159
215
|
|
|
160
|
-
|
|
216
|
+
Import is additive — re-importing creates duplicates. Delete `taskflow.db` first for a clean re-import.
|
|
161
217
|
|
|
162
218
|
## License
|
|
163
219
|
|
|
@@ -6,31 +6,92 @@ SQLite backend, 23+ MCP tools, web UI with embedded AI chat, and a FastAPI REST
|
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- **23+ MCP tools** — projects, tasks, sections, goals, daily focus, search, views, repo integration
|
|
9
|
+
- **23+ MCP tools** — projects, tasks, sections, goals, daily focus, search, views, repo integration
|
|
10
10
|
- **Web UI** — dark-theme SPA with project boards, task details, inline editing
|
|
11
11
|
- **AI chat** — embedded Claude chat with workspace awareness, tool access, and persistent memory
|
|
12
12
|
- **Daily focus** — Today view with goals, focus list, and AI-assisted daily planning
|
|
13
13
|
- **Goals** — timeframe-scoped goals (day/week/month/quarter) that guide daily prioritization
|
|
14
|
-
- **Agent memory** — persistent context across chat sessions
|
|
14
|
+
- **Agent memory** — persistent context across chat sessions
|
|
15
15
|
- **Repo integration** — read-only git status, recent commits, and TODOs across connected repos
|
|
16
16
|
- **FTS search** — full-text search across task names and notes
|
|
17
|
-
- **Server-side chat storage** — chat history persisted in SQLite with compaction
|
|
18
17
|
- **Asana import** — bulk import from Asana CSV exports
|
|
19
|
-
- **Service management** — start/stop the web server via MCP tools or Makefile
|
|
20
18
|
|
|
21
19
|
## Quick Start
|
|
22
20
|
|
|
23
21
|
```bash
|
|
24
|
-
pip install -
|
|
22
|
+
pip install taskflow-agent[web]
|
|
25
23
|
|
|
26
24
|
# Start the MCP server (for Claude Code)
|
|
27
25
|
taskflow
|
|
28
26
|
|
|
29
|
-
# Start the web UI
|
|
30
|
-
|
|
31
|
-
taskflow-web # via CLI
|
|
27
|
+
# Start the web UI (port 8787)
|
|
28
|
+
taskflow-web
|
|
32
29
|
```
|
|
33
30
|
|
|
31
|
+
## Setup
|
|
32
|
+
|
|
33
|
+
### 1. Environment
|
|
34
|
+
|
|
35
|
+
Create a `.env` file in your working directory:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Auth — pick one mode
|
|
39
|
+
ANTHROPIC_AUTH_MODE=api_key # "oauth" or "api_key"
|
|
40
|
+
ANTHROPIC_API_KEY=sk-ant-... # if using api_key mode
|
|
41
|
+
ANTHROPIC_AUTH_TOKEN=... # if using oauth mode
|
|
42
|
+
|
|
43
|
+
# Optional
|
|
44
|
+
ANTHROPIC_MODEL=claude-sonnet-4-6 # default model for chat
|
|
45
|
+
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The MCP server (task management tools) works without auth. Auth is only needed for the web UI's embedded AI chat.
|
|
49
|
+
|
|
50
|
+
### 2. Register MCP Server
|
|
51
|
+
|
|
52
|
+
Add to `~/.claude.json`:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"taskflow": {
|
|
58
|
+
"type": "stdio",
|
|
59
|
+
"command": "path/to/venv/bin/python",
|
|
60
|
+
"args": ["-m", "src.server"],
|
|
61
|
+
"cwd": "path/to/taskflow"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 3. Configure Repos (optional)
|
|
68
|
+
|
|
69
|
+
Create `data/repos.json` to connect git repos for status tracking:
|
|
70
|
+
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"my-project": "/absolute/path/to/my-project",
|
|
74
|
+
"another-repo": "/absolute/path/to/another-repo"
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`tf_repo_list` and `tf_repo_status` use this to show branch, state, recent commits, and TODOs. Read-only.
|
|
79
|
+
|
|
80
|
+
### 4. Run
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
# Web UI
|
|
84
|
+
taskflow-web # port 8787
|
|
85
|
+
# or with make (if developing from source):
|
|
86
|
+
make serve # foreground
|
|
87
|
+
make dev # with auto-reload
|
|
88
|
+
|
|
89
|
+
# MCP server only
|
|
90
|
+
taskflow
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Open `http://localhost:8787`.
|
|
94
|
+
|
|
34
95
|
## MCP Tools
|
|
35
96
|
|
|
36
97
|
### Projects
|
|
@@ -98,41 +159,36 @@ taskflow-web # via CLI
|
|
|
98
159
|
| `tf_serve_start` | Start web server in background |
|
|
99
160
|
| `tf_serve_stop` | Stop web server |
|
|
100
161
|
|
|
101
|
-
##
|
|
162
|
+
## Embedded Chat
|
|
102
163
|
|
|
103
|
-
|
|
164
|
+
The web UI includes an AI chat panel (toggle with `C`) powered by [ai-agent-gateway](https://pypi.org/project/ai-agent-gateway/).
|
|
104
165
|
|
|
105
|
-
|
|
106
|
-
{
|
|
107
|
-
"mcpServers": {
|
|
108
|
-
"taskflow": {
|
|
109
|
-
"type": "stdio",
|
|
110
|
-
"command": "path/to/venv/bin/python",
|
|
111
|
-
"args": ["-m", "src.server"],
|
|
112
|
-
"cwd": "path/to/taskflow"
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
## Web UI
|
|
166
|
+
### What the chat agent can do
|
|
119
167
|
|
|
120
|
-
|
|
168
|
+
- All `tf_*` tools — manage projects, tasks, goals, focus
|
|
169
|
+
- `read_file` / `list_dir` / `run_shell` — filesystem access
|
|
170
|
+
- `notes_search` / `notes_read` — Apple Notes integration
|
|
171
|
+
- `tf_memory_read` / `tf_memory_update` — persistent memory across sessions (stored in `data/agent_memory.md`, 12 KB max)
|
|
172
|
+
- `load_tools` — dynamically load any MCP server from `~/.claude.json` on demand
|
|
121
173
|
|
|
122
|
-
|
|
123
|
-
make serve # foreground, Ctrl-C to stop
|
|
124
|
-
make dev # with auto-reload
|
|
125
|
-
make status # check if running
|
|
126
|
-
make stop # stop the server
|
|
127
|
-
```
|
|
174
|
+
### Deferred MCP Servers
|
|
128
175
|
|
|
129
|
-
|
|
176
|
+
The chat agent can load any `stdio`-type MCP server registered in your `~/.claude.json` on demand. The agent calls `load_tools("server-name")` and gains access to that server's tools for the session.
|
|
130
177
|
|
|
131
178
|
## Database
|
|
132
179
|
|
|
133
|
-
SQLite with WAL mode.
|
|
180
|
+
SQLite with WAL mode. Created automatically on first run.
|
|
181
|
+
|
|
182
|
+
Tables: `projects`, `sections`, `tasks`, `tags`, `task_tags`, `tasks_fts` (FTS5), `goals`, `daily_focus`, `chat_messages`.
|
|
183
|
+
|
|
184
|
+
## Asana Import
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Via MCP tool:
|
|
188
|
+
tf_import_asana directory=/path/to/Asana-Export/
|
|
189
|
+
```
|
|
134
190
|
|
|
135
|
-
|
|
191
|
+
Import is additive — re-importing creates duplicates. Delete `taskflow.db` first for a clean re-import.
|
|
136
192
|
|
|
137
193
|
## License
|
|
138
194
|
|
|
@@ -14,7 +14,7 @@ from typing import Optional
|
|
|
14
14
|
|
|
15
15
|
from mcp.server.fastmcp import FastMCP
|
|
16
16
|
|
|
17
|
-
from . import db
|
|
17
|
+
from . import db, workflows
|
|
18
18
|
|
|
19
19
|
mcp = FastMCP(
|
|
20
20
|
"taskflow",
|
|
@@ -28,6 +28,7 @@ mcp = FastMCP(
|
|
|
28
28
|
db.init_db()
|
|
29
29
|
|
|
30
30
|
_PROJECT_ROOT = Path(__file__).resolve().parent.parent
|
|
31
|
+
_VENV_PYTHON = _PROJECT_ROOT / "venv" / "bin" / "python"
|
|
31
32
|
_PID_FILE = _PROJECT_ROOT / "data" / "taskflow-web.pid"
|
|
32
33
|
_LOG_DIR = _PROJECT_ROOT / "logs"
|
|
33
34
|
_LOG_FILE = _LOG_DIR / "web.log"
|
|
@@ -659,7 +660,7 @@ def tf_serve_start() -> str:
|
|
|
659
660
|
log_fh = open(_LOG_FILE, "a")
|
|
660
661
|
try:
|
|
661
662
|
proc = subprocess.Popen(
|
|
662
|
-
[sys.executable, "-m", "src.web"],
|
|
663
|
+
[str(_VENV_PYTHON) if _VENV_PYTHON.exists() else sys.executable, "-m", "src.web"],
|
|
663
664
|
cwd=str(_PROJECT_ROOT),
|
|
664
665
|
stdout=log_fh,
|
|
665
666
|
stderr=subprocess.STDOUT,
|
|
@@ -750,6 +751,39 @@ def tf_repo_status(repo: str = "all", commits: int = 10) -> str:
|
|
|
750
751
|
return _json(repos.repo_status(repo, commit_count=commits))
|
|
751
752
|
|
|
752
753
|
|
|
754
|
+
@mcp.tool()
|
|
755
|
+
def tf_workflow_list() -> str:
|
|
756
|
+
"""List available workflow templates."""
|
|
757
|
+
workflow_items = workflows.list_workflows()
|
|
758
|
+
return _json({"workflows": workflow_items, "count": len(workflow_items)})
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
@mcp.tool()
|
|
762
|
+
def tf_workflow_get(slug: str) -> str:
|
|
763
|
+
"""Read a workflow template by slug."""
|
|
764
|
+
try:
|
|
765
|
+
workflow = workflows.get_workflow(slug)
|
|
766
|
+
except ValueError as exc:
|
|
767
|
+
return _error(str(exc))
|
|
768
|
+
except OSError as exc:
|
|
769
|
+
return _error(f"Could not read workflow '{slug}': {exc}")
|
|
770
|
+
if workflow is None:
|
|
771
|
+
return _error(f"Workflow '{slug}' not found")
|
|
772
|
+
return _json(workflow)
|
|
773
|
+
|
|
774
|
+
|
|
775
|
+
@mcp.tool()
|
|
776
|
+
def tf_workflow_save(slug: str, content: str) -> str:
|
|
777
|
+
"""Create or update a workflow template."""
|
|
778
|
+
try:
|
|
779
|
+
result = workflows.save_workflow(slug, content)
|
|
780
|
+
except ValueError as exc:
|
|
781
|
+
return _error(str(exc))
|
|
782
|
+
except OSError as exc:
|
|
783
|
+
return _error(f"Could not write workflow '{slug}': {exc}")
|
|
784
|
+
return _json(result)
|
|
785
|
+
|
|
786
|
+
|
|
753
787
|
def main():
|
|
754
788
|
mcp.run()
|
|
755
789
|
|