- Add ArchiveEntry type and archive.jsonl storage format for compact task archives - Implement archiveTask() with optional cleanup and archiveTaskAndCleanup() convenience method - Add restoreFromArchive() to reconstruct tasks from archive entries when directory is missing - Implement cleanupArchivedTasks() for bulk cleanup of all archived task directories - Add comprehensive tests for archive, cleanup, and restore operations (385+ lines) - Add readArchiveLog(), findInArchive(), and unarchiveTask() API methods - Document archive storage pattern and restoration behavior in AGENTS.md - Include changeset for patch release noting archive cleanup feature
725 B
725 B
@dustinbyrne/kb
| @dustinbyrne/kb |
|---|
| patch |
Add filesystem cleanup for archived tasks. Archived tasks can now be condensed into a compact archive.jsonl entry and removed from the filesystem to save space. Tasks can be restored from the archive log when unarchived.
New TaskStore methods:
archiveTask(id, cleanup)- Optional cleanup parameter to archive and clean up immediatelyarchiveTaskAndCleanup(id)- Convenience method for immediate cleanupcleanupArchivedTasks()- Bulk cleanup of all archived tasks with existing directoriesreadArchiveLog()- Parse archive.jsonl entriesfindInArchive(id)- Find a specific task in the archive logunarchiveTask(id)- Now restores from archive if directory is missing