taskseam 0.1.0__py3-none-any.whl
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.
- taskseam/__init__.py +3 -0
- taskseam/__main__.py +230 -0
- taskseam/api.py +164 -0
- taskseam/importer.py +41 -0
- taskseam/mcp.py +140 -0
- taskseam/setup.py +77 -0
- taskseam/store.py +299 -0
- taskseam/workspace.py +76 -0
- taskseam-0.1.0.dist-info/METADATA +147 -0
- taskseam-0.1.0.dist-info/RECORD +14 -0
- taskseam-0.1.0.dist-info/WHEEL +5 -0
- taskseam-0.1.0.dist-info/entry_points.txt +2 -0
- taskseam-0.1.0.dist-info/licenses/LICENSE +202 -0
- taskseam-0.1.0.dist-info/top_level.txt +1 -0
taskseam/store.py
ADDED
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"""SQLite storage for explicit task events and versioned checkpoints."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import sqlite3
|
|
5
|
+
import uuid
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
|
+
from pathlib import Path
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def _now():
|
|
11
|
+
return datetime.now(timezone.utc).isoformat()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _id():
|
|
15
|
+
return uuid.uuid4().hex[:12]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class Store:
|
|
19
|
+
def __init__(self, path):
|
|
20
|
+
self.path = Path(path).expanduser()
|
|
21
|
+
self.path.parent.mkdir(parents=True, exist_ok=True)
|
|
22
|
+
self.db = sqlite3.connect(str(self.path))
|
|
23
|
+
self.db.row_factory = sqlite3.Row
|
|
24
|
+
self.db.execute("PRAGMA foreign_keys = ON")
|
|
25
|
+
self.db.execute("PRAGMA busy_timeout = 5000")
|
|
26
|
+
schema_version = self.db.execute("PRAGMA user_version").fetchone()[0]
|
|
27
|
+
if schema_version > 3:
|
|
28
|
+
self.db.close()
|
|
29
|
+
raise ValueError("Database was created by a newer TaskSeam version")
|
|
30
|
+
self.db.executescript("""
|
|
31
|
+
CREATE TABLE IF NOT EXISTS tasks (
|
|
32
|
+
id TEXT PRIMARY KEY, title TEXT NOT NULL, created_at TEXT NOT NULL
|
|
33
|
+
);
|
|
34
|
+
CREATE TABLE IF NOT EXISTS events (
|
|
35
|
+
id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks(id),
|
|
36
|
+
source TEXT NOT NULL, body TEXT NOT NULL, created_at TEXT NOT NULL
|
|
37
|
+
);
|
|
38
|
+
CREATE TABLE IF NOT EXISTS items (
|
|
39
|
+
id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks(id),
|
|
40
|
+
kind TEXT NOT NULL CHECK (kind IN ('decision','question','constraint')),
|
|
41
|
+
body TEXT NOT NULL, event_id TEXT NOT NULL REFERENCES events(id),
|
|
42
|
+
supersedes TEXT REFERENCES items(id), created_at TEXT NOT NULL
|
|
43
|
+
);
|
|
44
|
+
CREATE TABLE IF NOT EXISTS checkpoints (
|
|
45
|
+
id TEXT PRIMARY KEY, task_id TEXT NOT NULL REFERENCES tasks(id),
|
|
46
|
+
created_at TEXT NOT NULL, snapshot TEXT NOT NULL
|
|
47
|
+
);
|
|
48
|
+
CREATE TABLE IF NOT EXISTS resolutions (
|
|
49
|
+
question_id TEXT PRIMARY KEY REFERENCES items(id),
|
|
50
|
+
resolution_item_id TEXT NOT NULL UNIQUE REFERENCES items(id),
|
|
51
|
+
created_at TEXT NOT NULL
|
|
52
|
+
);
|
|
53
|
+
CREATE TABLE IF NOT EXISTS deliveries (
|
|
54
|
+
task_id TEXT NOT NULL REFERENCES tasks(id),
|
|
55
|
+
target TEXT NOT NULL,
|
|
56
|
+
checkpoint_id TEXT NOT NULL REFERENCES checkpoints(id),
|
|
57
|
+
delivered_at TEXT NOT NULL,
|
|
58
|
+
PRIMARY KEY (task_id, target)
|
|
59
|
+
);
|
|
60
|
+
CREATE INDEX IF NOT EXISTS events_task_idx ON events(task_id);
|
|
61
|
+
CREATE INDEX IF NOT EXISTS items_task_idx ON items(task_id);
|
|
62
|
+
CREATE INDEX IF NOT EXISTS checkpoints_task_idx ON checkpoints(task_id);
|
|
63
|
+
PRAGMA user_version = 3;
|
|
64
|
+
""")
|
|
65
|
+
self.db.commit()
|
|
66
|
+
|
|
67
|
+
def close(self):
|
|
68
|
+
self.db.close()
|
|
69
|
+
|
|
70
|
+
def create_task(self, title):
|
|
71
|
+
task_id = _id()
|
|
72
|
+
with self.db:
|
|
73
|
+
self.db.execute("INSERT INTO tasks VALUES (?, ?, ?)", (task_id, title, _now()))
|
|
74
|
+
return task_id
|
|
75
|
+
|
|
76
|
+
def task(self, task_id):
|
|
77
|
+
row = self.db.execute("SELECT * FROM tasks WHERE id = ?", (task_id,)).fetchone()
|
|
78
|
+
if row is None:
|
|
79
|
+
raise ValueError("Unknown task: " + task_id)
|
|
80
|
+
return dict(row)
|
|
81
|
+
|
|
82
|
+
def tasks(self):
|
|
83
|
+
return [dict(row) for row in self.db.execute("SELECT * FROM tasks ORDER BY created_at DESC")]
|
|
84
|
+
|
|
85
|
+
def events(self, task_id):
|
|
86
|
+
self.task(task_id)
|
|
87
|
+
return [dict(row) for row in self.db.execute(
|
|
88
|
+
"SELECT * FROM events WHERE task_id = ? ORDER BY created_at, rowid", (task_id,)
|
|
89
|
+
)]
|
|
90
|
+
|
|
91
|
+
def add_event(self, task_id, source, body):
|
|
92
|
+
self.task(task_id)
|
|
93
|
+
event_id = _id()
|
|
94
|
+
with self.db:
|
|
95
|
+
self.db.execute("INSERT INTO events VALUES (?, ?, ?, ?, ?)",
|
|
96
|
+
(event_id, task_id, source, body, _now()))
|
|
97
|
+
return event_id
|
|
98
|
+
|
|
99
|
+
def add_item(self, task_id, kind, body, source, supersedes=None):
|
|
100
|
+
self.task(task_id)
|
|
101
|
+
if kind not in ("decision", "question", "constraint"):
|
|
102
|
+
raise ValueError("Invalid item kind: " + kind)
|
|
103
|
+
if supersedes:
|
|
104
|
+
old = self.db.execute("SELECT task_id, kind FROM items WHERE id = ?", (supersedes,)).fetchone()
|
|
105
|
+
if old is None or old["task_id"] != task_id or old["kind"] != kind:
|
|
106
|
+
raise ValueError("Superseded item must exist in the same task and have the same kind")
|
|
107
|
+
if self.db.execute("SELECT 1 FROM items WHERE supersedes = ?", (supersedes,)).fetchone():
|
|
108
|
+
raise ValueError("Item has already been superseded")
|
|
109
|
+
event_id, item_id = _id(), _id()
|
|
110
|
+
with self.db:
|
|
111
|
+
self.db.execute("INSERT INTO events VALUES (?, ?, ?, ?, ?)",
|
|
112
|
+
(event_id, task_id, source, body, _now()))
|
|
113
|
+
self.db.execute("INSERT INTO items VALUES (?, ?, ?, ?, ?, ?, ?)",
|
|
114
|
+
(item_id, task_id, kind, body, event_id, supersedes, _now()))
|
|
115
|
+
return item_id
|
|
116
|
+
|
|
117
|
+
def import_items(self, task_id, source, evidence, items):
|
|
118
|
+
self.task(task_id)
|
|
119
|
+
if not isinstance(items, list) or not items:
|
|
120
|
+
raise ValueError("Import packet must contain at least one item")
|
|
121
|
+
normalized = []
|
|
122
|
+
for item in items:
|
|
123
|
+
if not isinstance(item, dict):
|
|
124
|
+
raise ValueError("Each imported item must be an object")
|
|
125
|
+
kind, body = item.get("kind"), item.get("body")
|
|
126
|
+
if kind not in ("decision", "question", "constraint"):
|
|
127
|
+
raise ValueError("Invalid imported item kind: " + str(kind))
|
|
128
|
+
if not isinstance(body, str) or not body.strip():
|
|
129
|
+
raise ValueError("Each imported item requires a non-empty body")
|
|
130
|
+
normalized.append((kind, body.strip()))
|
|
131
|
+
event_id = _id()
|
|
132
|
+
created = _now()
|
|
133
|
+
item_ids = []
|
|
134
|
+
with self.db:
|
|
135
|
+
self.db.execute("INSERT INTO events VALUES (?, ?, ?, ?, ?)",
|
|
136
|
+
(event_id, task_id, source, evidence, created))
|
|
137
|
+
for kind, body in normalized:
|
|
138
|
+
item_id = _id()
|
|
139
|
+
self.db.execute("INSERT INTO items VALUES (?, ?, ?, ?, ?, ?, ?)",
|
|
140
|
+
(item_id, task_id, kind, body, event_id, None, created))
|
|
141
|
+
item_ids.append(item_id)
|
|
142
|
+
return {"event_id": event_id, "item_ids": item_ids}
|
|
143
|
+
|
|
144
|
+
def items(self, task_id):
|
|
145
|
+
self.task(task_id)
|
|
146
|
+
rows = self.db.execute("""
|
|
147
|
+
SELECT i.*, e.source,
|
|
148
|
+
(SELECT r.question_id FROM resolutions r WHERE r.resolution_item_id = i.id) AS resolves
|
|
149
|
+
FROM items i JOIN events e ON e.id = i.event_id
|
|
150
|
+
WHERE i.task_id = ? ORDER BY i.created_at, i.rowid
|
|
151
|
+
""", (task_id,)).fetchall()
|
|
152
|
+
return [dict(row) for row in rows]
|
|
153
|
+
|
|
154
|
+
def current_items(self, task_id):
|
|
155
|
+
rows = self.items(task_id)
|
|
156
|
+
replaced = {row["supersedes"] for row in rows if row["supersedes"]}
|
|
157
|
+
resolved = {row[0] for row in self.db.execute(
|
|
158
|
+
"SELECT question_id FROM resolutions WHERE question_id IN "
|
|
159
|
+
"(SELECT id FROM items WHERE task_id = ?)", (task_id,)
|
|
160
|
+
)}
|
|
161
|
+
return [row for row in rows if row["id"] not in replaced and row["id"] not in resolved]
|
|
162
|
+
|
|
163
|
+
def resolve_question(self, task_id, question_id, decision, source, supersedes=None):
|
|
164
|
+
self.task(task_id)
|
|
165
|
+
question = self.db.execute(
|
|
166
|
+
"SELECT task_id, kind FROM items WHERE id = ?", (question_id,)
|
|
167
|
+
).fetchone()
|
|
168
|
+
if question is None or question["task_id"] != task_id or question["kind"] != "question":
|
|
169
|
+
raise ValueError("Question must exist in the active task")
|
|
170
|
+
if self.db.execute("SELECT 1 FROM resolutions WHERE question_id = ?", (question_id,)).fetchone():
|
|
171
|
+
raise ValueError("Question has already been resolved")
|
|
172
|
+
if not isinstance(decision, str) or not decision.strip():
|
|
173
|
+
raise ValueError("Resolution decision cannot be empty")
|
|
174
|
+
if supersedes:
|
|
175
|
+
old = self.db.execute("SELECT task_id, kind FROM items WHERE id = ?", (supersedes,)).fetchone()
|
|
176
|
+
if old is None or old["task_id"] != task_id or old["kind"] != "decision":
|
|
177
|
+
raise ValueError("Superseded decision must exist in the active task")
|
|
178
|
+
if self.db.execute("SELECT 1 FROM items WHERE supersedes = ?", (supersedes,)).fetchone():
|
|
179
|
+
raise ValueError("Decision has already been superseded")
|
|
180
|
+
event_id, item_id, created = _id(), _id(), _now()
|
|
181
|
+
with self.db:
|
|
182
|
+
self.db.execute("INSERT INTO events VALUES (?, ?, ?, ?, ?)",
|
|
183
|
+
(event_id, task_id, source, decision.strip(), created))
|
|
184
|
+
self.db.execute("INSERT INTO items VALUES (?, ?, ?, ?, ?, ?, ?)",
|
|
185
|
+
(item_id, task_id, "decision", decision.strip(), event_id, supersedes, created))
|
|
186
|
+
self.db.execute("INSERT INTO resolutions VALUES (?, ?, ?)",
|
|
187
|
+
(question_id, item_id, created))
|
|
188
|
+
return item_id
|
|
189
|
+
|
|
190
|
+
def set_supersession(self, task_id, old_item_id, new_item_id):
|
|
191
|
+
self.task(task_id)
|
|
192
|
+
rows = self.db.execute(
|
|
193
|
+
"SELECT id, task_id, kind, supersedes FROM items WHERE id IN (?, ?)",
|
|
194
|
+
(old_item_id, new_item_id),
|
|
195
|
+
).fetchall()
|
|
196
|
+
by_id = {row["id"]: row for row in rows}
|
|
197
|
+
old, new = by_id.get(old_item_id), by_id.get(new_item_id)
|
|
198
|
+
if old is None or new is None or old["task_id"] != task_id or new["task_id"] != task_id:
|
|
199
|
+
raise ValueError("Both items must exist in the active task")
|
|
200
|
+
if old_item_id == new_item_id or old["kind"] != new["kind"]:
|
|
201
|
+
raise ValueError("Supersession requires two different items of the same kind")
|
|
202
|
+
if new["supersedes"] and new["supersedes"] != old_item_id:
|
|
203
|
+
raise ValueError("New item already supersedes another item")
|
|
204
|
+
cursor = old
|
|
205
|
+
seen = set()
|
|
206
|
+
while cursor and cursor["id"] not in seen:
|
|
207
|
+
if cursor["id"] == new_item_id:
|
|
208
|
+
raise ValueError("Supersession would create a cycle")
|
|
209
|
+
seen.add(cursor["id"])
|
|
210
|
+
cursor = (self.db.execute(
|
|
211
|
+
"SELECT id, task_id, kind, supersedes FROM items WHERE id = ?", (cursor["supersedes"],)
|
|
212
|
+
).fetchone() if cursor["supersedes"] else None)
|
|
213
|
+
if self.db.execute(
|
|
214
|
+
"SELECT 1 FROM items WHERE supersedes = ? AND id != ?", (old_item_id, new_item_id)
|
|
215
|
+
).fetchone():
|
|
216
|
+
raise ValueError("Old item has already been superseded")
|
|
217
|
+
with self.db:
|
|
218
|
+
self.db.execute("UPDATE items SET supersedes = ? WHERE id = ?", (old_item_id, new_item_id))
|
|
219
|
+
|
|
220
|
+
def explain(self, item_id):
|
|
221
|
+
row = self.db.execute("""
|
|
222
|
+
SELECT i.*, e.source, e.body AS evidence, e.created_at AS event_time
|
|
223
|
+
FROM items i JOIN events e ON e.id = i.event_id WHERE i.id = ?
|
|
224
|
+
""", (item_id,)).fetchone()
|
|
225
|
+
if row is None:
|
|
226
|
+
raise ValueError("Unknown item: " + item_id)
|
|
227
|
+
return dict(row)
|
|
228
|
+
|
|
229
|
+
def checkpoint(self, task_id):
|
|
230
|
+
snapshot = [row["id"] for row in self.current_items(task_id)]
|
|
231
|
+
checkpoint_id = _id()
|
|
232
|
+
with self.db:
|
|
233
|
+
self.db.execute("INSERT INTO checkpoints VALUES (?, ?, ?, ?)",
|
|
234
|
+
(checkpoint_id, task_id, _now(), json.dumps(snapshot)))
|
|
235
|
+
return checkpoint_id
|
|
236
|
+
|
|
237
|
+
def checkpoints(self, task_id):
|
|
238
|
+
self.task(task_id)
|
|
239
|
+
return [dict(row) for row in self.db.execute(
|
|
240
|
+
"SELECT id, task_id, created_at FROM checkpoints WHERE task_id = ? ORDER BY rowid",
|
|
241
|
+
(task_id,),
|
|
242
|
+
)]
|
|
243
|
+
|
|
244
|
+
def context(self, task_id):
|
|
245
|
+
return {"task": self.task(task_id), "items": self.current_items(task_id)}
|
|
246
|
+
|
|
247
|
+
def _checkpoint(self, checkpoint_id):
|
|
248
|
+
row = self.db.execute("SELECT rowid AS sequence, * FROM checkpoints WHERE id = ?", (checkpoint_id,)).fetchone()
|
|
249
|
+
if row is None:
|
|
250
|
+
raise ValueError("Unknown checkpoint: " + checkpoint_id)
|
|
251
|
+
return dict(row)
|
|
252
|
+
|
|
253
|
+
def delta(self, base_id, head_id):
|
|
254
|
+
base, head = self._checkpoint(base_id), self._checkpoint(head_id)
|
|
255
|
+
if base["task_id"] != head["task_id"]:
|
|
256
|
+
raise ValueError("Checkpoints belong to different tasks")
|
|
257
|
+
if base["sequence"] > head["sequence"]:
|
|
258
|
+
raise ValueError("Base checkpoint is newer than head checkpoint")
|
|
259
|
+
before, after = set(json.loads(base["snapshot"])), set(json.loads(head["snapshot"]))
|
|
260
|
+
by_id = {row["id"]: row for row in self.items(base["task_id"])}
|
|
261
|
+
return {
|
|
262
|
+
"task": self.task(base["task_id"]), "base": base_id, "head": head_id,
|
|
263
|
+
"added": [by_id[item_id] for item_id in json.loads(head["snapshot"]) if item_id not in before],
|
|
264
|
+
"removed": [by_id[item_id] for item_id in json.loads(base["snapshot"]) if item_id not in after],
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
def handoff(self, task_id, target):
|
|
268
|
+
self.task(task_id)
|
|
269
|
+
if not isinstance(target, str) or not target.strip():
|
|
270
|
+
raise ValueError("Handoff target cannot be empty")
|
|
271
|
+
target = target.strip().lower()
|
|
272
|
+
current = self.current_items(task_id)
|
|
273
|
+
current_ids = [item["id"] for item in current]
|
|
274
|
+
delivery = self.db.execute(
|
|
275
|
+
"SELECT checkpoint_id FROM deliveries WHERE task_id = ? AND target = ?",
|
|
276
|
+
(task_id, target),
|
|
277
|
+
).fetchone()
|
|
278
|
+
base_id = delivery["checkpoint_id"] if delivery else None
|
|
279
|
+
if base_id:
|
|
280
|
+
previous = self._checkpoint(base_id)
|
|
281
|
+
if json.loads(previous["snapshot"]) == current_ids:
|
|
282
|
+
return {"task": self.task(task_id), "target": target, "base": base_id,
|
|
283
|
+
"head": base_id, "added": [], "removed": [], "changed": False}
|
|
284
|
+
head_id = self.checkpoint(task_id)
|
|
285
|
+
if base_id:
|
|
286
|
+
result = self.delta(base_id, head_id)
|
|
287
|
+
else:
|
|
288
|
+
result = {"task": self.task(task_id), "base": None, "head": head_id,
|
|
289
|
+
"added": current, "removed": []}
|
|
290
|
+
with self.db:
|
|
291
|
+
self.db.execute("""
|
|
292
|
+
INSERT INTO deliveries (task_id, target, checkpoint_id, delivered_at)
|
|
293
|
+
VALUES (?, ?, ?, ?)
|
|
294
|
+
ON CONFLICT(task_id, target) DO UPDATE SET
|
|
295
|
+
checkpoint_id = excluded.checkpoint_id,
|
|
296
|
+
delivered_at = excluded.delivered_at
|
|
297
|
+
""", (task_id, target, head_id, _now()))
|
|
298
|
+
result.update({"target": target, "changed": bool(result["added"] or result["removed"])})
|
|
299
|
+
return result
|
taskseam/workspace.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"""Repository-local TaskSeam workspace configuration."""
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
import secrets
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
CONFIG_VERSION = 1
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def find_workspace(start=None):
|
|
12
|
+
current = Path(start or Path.cwd()).resolve()
|
|
13
|
+
for directory in (current, *current.parents):
|
|
14
|
+
config_path = directory / ".taskseam" / "config.json"
|
|
15
|
+
if config_path.is_file():
|
|
16
|
+
data = json.loads(config_path.read_text(encoding="utf-8"))
|
|
17
|
+
if data.get("version") != CONFIG_VERSION:
|
|
18
|
+
raise ValueError("Unsupported workspace configuration version")
|
|
19
|
+
return directory, data
|
|
20
|
+
return None
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def initialize(directory, title, create_task):
|
|
24
|
+
root = Path(directory).resolve()
|
|
25
|
+
state_dir = root / ".taskseam"
|
|
26
|
+
config_path = state_dir / "config.json"
|
|
27
|
+
if config_path.exists():
|
|
28
|
+
raise ValueError("TaskSeam is already initialized in " + str(root))
|
|
29
|
+
state_dir.mkdir(parents=True, exist_ok=True)
|
|
30
|
+
task_id = create_task(state_dir / "state.db", title)
|
|
31
|
+
config = {
|
|
32
|
+
"version": CONFIG_VERSION,
|
|
33
|
+
"project": root.name,
|
|
34
|
+
"active_task": task_id,
|
|
35
|
+
"database": "state.db",
|
|
36
|
+
"browser_token": secrets.token_urlsafe(24),
|
|
37
|
+
}
|
|
38
|
+
config_path.write_text(json.dumps(config, indent=2) + "\n", encoding="utf-8")
|
|
39
|
+
_ensure_ignored(root)
|
|
40
|
+
return root, config
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def database_path(workspace):
|
|
44
|
+
root, config = workspace
|
|
45
|
+
return root / ".taskseam" / config.get("database", "state.db")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def active_task(workspace):
|
|
49
|
+
task_id = workspace[1].get("active_task")
|
|
50
|
+
if not task_id:
|
|
51
|
+
raise ValueError("Workspace has no active task")
|
|
52
|
+
return task_id
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def browser_token(workspace):
|
|
56
|
+
"""Return a workspace bridge token, adding one to older workspaces."""
|
|
57
|
+
root, config = workspace
|
|
58
|
+
token = config.get("browser_token")
|
|
59
|
+
if token:
|
|
60
|
+
return token
|
|
61
|
+
token = secrets.token_urlsafe(24)
|
|
62
|
+
config["browser_token"] = token
|
|
63
|
+
(root / ".taskseam" / "config.json").write_text(
|
|
64
|
+
json.dumps(config, indent=2) + "\n", encoding="utf-8")
|
|
65
|
+
return token
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _ensure_ignored(root):
|
|
69
|
+
ignore = root / ".gitignore"
|
|
70
|
+
text = ignore.read_text(encoding="utf-8") if ignore.exists() else ""
|
|
71
|
+
entries = {line.strip() for line in text.splitlines()}
|
|
72
|
+
if ".taskseam/" not in entries and "/.taskseam/" not in entries:
|
|
73
|
+
if text and not text.endswith("\n"):
|
|
74
|
+
text += "\n"
|
|
75
|
+
text += ".taskseam/\n"
|
|
76
|
+
ignore.write_text(text, encoding="utf-8")
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: taskseam
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local-first task continuity across AI coding agents
|
|
5
|
+
Author: Sai Sandeep Kantareddy
|
|
6
|
+
Maintainer: Sai Sandeep Kantareddy
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
Project-URL: Homepage, https://github.com/TaskSeam/taskseam
|
|
9
|
+
Project-URL: Documentation, https://taskseam.github.io/taskseam/
|
|
10
|
+
Project-URL: Repository, https://github.com/TaskSeam/taskseam
|
|
11
|
+
Project-URL: Issues, https://github.com/TaskSeam/taskseam/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/TaskSeam/taskseam/blob/main/CHANGELOG.md
|
|
13
|
+
Keywords: ai-agents,coding-agents,codex,claude-code,vscode,mcp,local-first,context-engineering,task-continuity,developer-tools
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: Console
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Topic :: Software Development
|
|
25
|
+
Requires-Python: >=3.9
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Dynamic: license-file
|
|
29
|
+
|
|
30
|
+
# TaskSeam
|
|
31
|
+
|
|
32
|
+
**Switch AI. Keep working.**
|
|
33
|
+
|
|
34
|
+
TaskSeam keeps the accepted state of a project available when work moves between Codex, Claude Code, VS Code agents, ChatGPT, and Claude.
|
|
35
|
+
|
|
36
|
+
[Website](https://taskseam.github.io/taskseam/) · [Editor setup](https://github.com/TaskSeam/taskseam/blob/main/docs/EDITOR_SETUP.md) · [Quick start](https://github.com/TaskSeam/taskseam/blob/main/docs/QUICKSTART.md) · [Demo](https://github.com/TaskSeam/taskseam/blob/main/docs/DEMO.md) · [Privacy](https://github.com/TaskSeam/taskseam/blob/main/PRIVACY.md)
|
|
37
|
+
|
|
38
|
+
> **Public alpha:** The local CLI, MCP server, agent plugin, project state, provenance, and per-agent continuation are working. The browser extension is a developer preview. PyPI and extension-store distribution are being prepared.
|
|
39
|
+
|
|
40
|
+
## Quick start
|
|
41
|
+
|
|
42
|
+
Install TaskSeam:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pipx install git+https://github.com/TaskSeam/taskseam.git
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Connect the supported agents installed on your computer:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
taskseam setup
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Enable TaskSeam in a project:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
cd your-project
|
|
58
|
+
taskseam init
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Now open the project in **Codex for VS Code/Cursor**, **Claude Code for VS Code**, or their terminal interface and start a new chat. TaskSeam supplies the project's accepted decisions, active constraints, unresolved questions, and changes the agent has not seen. Durable changes use the agent's normal tool-approval screen.
|
|
62
|
+
|
|
63
|
+
Start with this prompt:
|
|
64
|
+
|
|
65
|
+
> Continue this project. What accepted decisions, constraints, and open questions should I know?
|
|
66
|
+
|
|
67
|
+
There are no routine TaskSeam commands after initialization.
|
|
68
|
+
|
|
69
|
+
## What changes for the user?
|
|
70
|
+
|
|
71
|
+
Without TaskSeam:
|
|
72
|
+
|
|
73
|
+
1. Explain the project again.
|
|
74
|
+
2. Paste an earlier conversation.
|
|
75
|
+
3. Correct an outdated summary.
|
|
76
|
+
4. Repeat when switching tools.
|
|
77
|
+
|
|
78
|
+
With TaskSeam:
|
|
79
|
+
|
|
80
|
+
1. Start an agent in the project.
|
|
81
|
+
2. Continue the work.
|
|
82
|
+
3. Approve durable project changes when prompted.
|
|
83
|
+
|
|
84
|
+
TaskSeam stores project state locally under `.taskseam/`, which it adds to `.gitignore`.
|
|
85
|
+
|
|
86
|
+
## Supported surfaces
|
|
87
|
+
|
|
88
|
+
| Surface | Current experience |
|
|
89
|
+
|---|---|
|
|
90
|
+
| Codex in VS Code/Cursor and CLI | Working alpha through shared MCP configuration |
|
|
91
|
+
| Claude Code in VS Code and terminal | Working alpha through user scoped MCP configuration |
|
|
92
|
+
| VS Code with GitHub Copilot | Working alpha through the portable agent plugin |
|
|
93
|
+
| ChatGPT and Claude websites | Developer-preview browser extension with explicit review |
|
|
94
|
+
| Claude Desktop general chat | Planned desktop extension with project selection |
|
|
95
|
+
|
|
96
|
+
See the [editor setup guide](https://github.com/TaskSeam/taskseam/blob/main/docs/EDITOR_SETUP.md) for the exact UI steps and the [integration guide](https://github.com/TaskSeam/taskseam/blob/main/docs/INTEGRATIONS.md) for technical details.
|
|
97
|
+
|
|
98
|
+
## Why this is different from shared memory
|
|
99
|
+
|
|
100
|
+
Shared memory retrieves potentially relevant facts. Session summaries describe what happened in one conversation. TaskSeam maintains the current state of a project, preserves what changed, and tracks what each agent has already received.
|
|
101
|
+
|
|
102
|
+
```text
|
|
103
|
+
Claude discussion ─┐
|
|
104
|
+
ChatGPT decision ──┼─> current project state ─> unseen changes ─> Codex
|
|
105
|
+
Code and Git ──────┘ │ │
|
|
106
|
+
provenance per agent
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
The goal is a small, explainable continuation rather than a transcript dump.
|
|
110
|
+
|
|
111
|
+
## Privacy model
|
|
112
|
+
|
|
113
|
+
- Project state stays on the user's computer by default.
|
|
114
|
+
- Agent writes use the host's approval flow.
|
|
115
|
+
- Browser capture starts only after an explicit user action.
|
|
116
|
+
- Browser results remain editable before saving.
|
|
117
|
+
- TaskSeam does not operate an analytics, advertising, or hosted synchronization service.
|
|
118
|
+
|
|
119
|
+
Read the [privacy policy](https://github.com/TaskSeam/taskseam/blob/main/PRIVACY.md) and [security policy](https://github.com/TaskSeam/taskseam/blob/main/SECURITY.md) for the current alpha boundaries.
|
|
120
|
+
|
|
121
|
+
## Try the complete flow
|
|
122
|
+
|
|
123
|
+
The [five-minute demo](https://github.com/TaskSeam/taskseam/blob/main/docs/DEMO.md) starts with a clean directory, accepts a project decision in one agent, continues in another, and verifies that the first agent later receives only what changed.
|
|
124
|
+
|
|
125
|
+
## Project status
|
|
126
|
+
|
|
127
|
+
The [public roadmap](https://github.com/TaskSeam/taskseam/blob/main/ROADMAP.md) tracks the current priorities:
|
|
128
|
+
|
|
129
|
+
1. Validate clean installation across supported operating systems.
|
|
130
|
+
2. Publish the Python package to PyPI.
|
|
131
|
+
3. Package and submit the browser extension.
|
|
132
|
+
4. Improve automatic task matching and correction.
|
|
133
|
+
5. Publish repeatable continuity evaluations.
|
|
134
|
+
|
|
135
|
+
## Development
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
git clone https://github.com/TaskSeam/taskseam.git
|
|
139
|
+
cd taskseam
|
|
140
|
+
python3 -m venv .venv
|
|
141
|
+
.venv/bin/python -m pip install -e .
|
|
142
|
+
.venv/bin/python -m unittest discover -s tests -v
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
TaskSeam is licensed under Apache-2.0. Contributions are welcome through focused issues and pull requests. Read the [contribution guide](https://github.com/TaskSeam/taskseam/blob/main/CONTRIBUTING.md) before making broad architecture changes.
|
|
146
|
+
|
|
147
|
+
Created and maintained by **Sai Sandeep Kantareddy**.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
taskseam/__init__.py,sha256=rjQp4u5ruvdeinx2Vx6d78v_hSEAx-XNJ99JK6OVqRQ,65
|
|
2
|
+
taskseam/__main__.py,sha256=Hnd4v6NhxRZXI2VVb9mWUo_Ba61fwwaNfn0KjuC2RHk,11643
|
|
3
|
+
taskseam/api.py,sha256=u9VCAh-5n6jlJkYIjgUFwzomYWLHomZt44-dGgZxoMU,7467
|
|
4
|
+
taskseam/importer.py,sha256=j_3QURDe9dHslnzERWbPBLkD4cjYILoxbZG5Sa_Qhj8,1714
|
|
5
|
+
taskseam/mcp.py,sha256=fW13I26skp3ZNJH3_LrkPbedPEjdWc9XynVtetTtup4,7336
|
|
6
|
+
taskseam/setup.py,sha256=I3P78r28YZQL_s8MtgZai5D_LxgFMw3HRX4FHRMgWo8,3441
|
|
7
|
+
taskseam/store.py,sha256=IvmRz8yj7LNwSBIgQ0U1RC3_IByNHuyq604SzSe4dbY,14511
|
|
8
|
+
taskseam/workspace.py,sha256=uxHRJGFjzz2-adcMn2TCNVpvpzXKdpBXZ2pfM266CIo,2459
|
|
9
|
+
taskseam-0.1.0.dist-info/licenses/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
|
|
10
|
+
taskseam-0.1.0.dist-info/METADATA,sha256=EgNCLZ6daOaB7Tm06qd_myI5v5Lcmr18xtF3WhIiYas,6293
|
|
11
|
+
taskseam-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
12
|
+
taskseam-0.1.0.dist-info/entry_points.txt,sha256=ArdGT0PJU2ebiolN6Z2v9KM0gGa76a-XxQh3O3vON14,52
|
|
13
|
+
taskseam-0.1.0.dist-info/top_level.txt,sha256=l0Pu0iRrQb8oRcrOj373IwaZC-RlQNnMzRJHNzmpZJE,9
|
|
14
|
+
taskseam-0.1.0.dist-info/RECORD,,
|