trekoon 0.4.5 → 0.4.7
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.
- package/.agents/skills/trekoon/SKILL.md +37 -36
- package/.agents/skills/trekoon/reference/execution.md +73 -69
- package/.agents/skills/trekoon/reference/harness-primitives.md +37 -0
- package/.agents/skills/trekoon/reference/planning.md +66 -72
- package/README.md +28 -0
- package/docs/commands.md +38 -6
- package/docs/machine-contracts.md +1 -0
- package/docs/quickstart.md +6 -2
- package/package.json +1 -1
- package/src/board/assets/state/actions.js +32 -10
- package/src/board/assets/state/api.js +234 -35
- package/src/board/assets/state/utils.js +18 -0
- package/src/board/routes.ts +27 -14
- package/src/board/snapshot.ts +9 -19
- package/src/board/wal-watcher.ts +637 -74
- package/src/commands/epic.ts +6 -6
- package/src/commands/help.ts +20 -6
- package/src/commands/quickstart.ts +5 -2
- package/src/commands/session.ts +161 -1
- package/src/commands/subtask.ts +2 -2
- package/src/commands/suggest.ts +1 -1
- package/src/commands/task.ts +2 -2
- package/src/domain/mutation-service.ts +83 -9
- package/src/domain/tracker-domain.ts +109 -6
- package/src/io/output.ts +1 -1
- package/src/storage/database.ts +67 -2
- package/src/storage/migrations.ts +149 -2
- package/src/storage/schema.ts +6 -1
- package/src/sync/event-writes.ts +24 -2
- package/.agents/skills/trekoon/reference/execution-with-team.md +0 -170
package/src/board/snapshot.ts
CHANGED
|
@@ -93,6 +93,8 @@ interface SnapshotDeltaSelection {
|
|
|
93
93
|
readonly taskIds?: readonly string[];
|
|
94
94
|
readonly subtaskIds?: readonly string[];
|
|
95
95
|
readonly dependencyIds?: readonly string[];
|
|
96
|
+
readonly deletedEpicIds?: readonly string[];
|
|
97
|
+
readonly deletedTaskIds?: readonly string[];
|
|
96
98
|
readonly deletedSubtaskIds?: readonly string[];
|
|
97
99
|
readonly deletedDependencyIds?: readonly string[];
|
|
98
100
|
}
|
|
@@ -253,6 +255,8 @@ export function buildBoardSnapshotDelta(domain: TrackerDomain, selection: Snapsh
|
|
|
253
255
|
tasks: snapshotTasks.filter((task) => requestedTaskIds.includes(task.id)),
|
|
254
256
|
subtasks: allSubtasks.map((subtask) => mapSnapshotSubtask(subtask, indexes)).filter((subtask) => requestedSubtaskIds.includes(subtask.id)),
|
|
255
257
|
dependencies: indexes.dependencies.filter((dependency) => requestedDependencyIds.has(dependency.id)),
|
|
258
|
+
deletedEpicIds: [...(selection.deletedEpicIds ?? [])],
|
|
259
|
+
deletedTaskIds: [...(selection.deletedTaskIds ?? [])],
|
|
256
260
|
deletedSubtaskIds: [...(selection.deletedSubtaskIds ?? [])],
|
|
257
261
|
deletedDependencyIds: [...(selection.deletedDependencyIds ?? [])],
|
|
258
262
|
};
|
|
@@ -265,22 +269,8 @@ export function buildBoardSnapshot(domain: TrackerDomain): BoardSnapshot {
|
|
|
265
269
|
const subtasks = domain.listSubtasks();
|
|
266
270
|
const sourceIds = [...tasks.map((task) => task.id), ...subtasks.map((subtask) => subtask.id)];
|
|
267
271
|
const dependenciesBySourceId = domain.listDependenciesBySourceIds(sourceIds);
|
|
268
|
-
const subtasksByTaskId = new Map<string, SubtaskRecord[]>();
|
|
269
|
-
const tasksByEpicId = new Map<string, TaskRecord[]>();
|
|
270
272
|
const indexes = buildDependencyIndexes(dependenciesBySourceId, sourceIds);
|
|
271
273
|
|
|
272
|
-
for (const task of tasks) {
|
|
273
|
-
const existing = tasksByEpicId.get(task.epicId) ?? [];
|
|
274
|
-
existing.push(task);
|
|
275
|
-
tasksByEpicId.set(task.epicId, existing);
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
for (const subtask of subtasks) {
|
|
279
|
-
const existing = subtasksByTaskId.get(subtask.taskId) ?? [];
|
|
280
|
-
existing.push(subtask);
|
|
281
|
-
subtasksByTaskId.set(subtask.taskId, existing);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
274
|
const snapshotSubtasks: BoardSnapshotSubtask[] = subtasks.map((subtask) => mapSnapshotSubtask(subtask, indexes));
|
|
285
275
|
const snapshotSubtasksByTaskId = new Map<string, BoardSnapshotSubtask[]>();
|
|
286
276
|
for (const subtask of snapshotSubtasks) {
|
|
@@ -290,14 +280,14 @@ export function buildBoardSnapshot(domain: TrackerDomain): BoardSnapshot {
|
|
|
290
280
|
}
|
|
291
281
|
|
|
292
282
|
const snapshotTasks: BoardSnapshotTask[] = tasks.map((task) => mapSnapshotTask(task, snapshotSubtasksByTaskId.get(task.id) ?? [], indexes));
|
|
293
|
-
const
|
|
283
|
+
const snapshotTasksByEpicId = new Map<string, BoardSnapshotTask[]>();
|
|
294
284
|
for (const task of snapshotTasks) {
|
|
295
|
-
const existing =
|
|
296
|
-
existing.push(task
|
|
297
|
-
|
|
285
|
+
const existing = snapshotTasksByEpicId.get(task.epicId) ?? [];
|
|
286
|
+
existing.push(task);
|
|
287
|
+
snapshotTasksByEpicId.set(task.epicId, existing);
|
|
298
288
|
}
|
|
299
289
|
|
|
300
|
-
const snapshotEpics: BoardSnapshotEpic[] = epics.map((epic) => mapSnapshotEpic(epic,
|
|
290
|
+
const snapshotEpics: BoardSnapshotEpic[] = epics.map((epic) => mapSnapshotEpic(epic, snapshotTasksByEpicId.get(epic.id) ?? []));
|
|
301
291
|
|
|
302
292
|
return {
|
|
303
293
|
generatedAt,
|