fix: use SDK API instead of sqlite3 CLI for cross-platform compatibility

- Replace sqlite3 CLI with client.session.messages() and client.session.todo()
- Fix message scan order: API returns oldest-first, now scans backwards
- Include cache.read in total token calculation
- Skip in-progress messages with zero tokens
- Silent error handling (no console.error for expected failures)
This commit is contained in:
Ralph Chang
2026-02-19 13:43:26 +08:00
parent 6fad91953c
commit 17258ce60f
2 changed files with 33 additions and 39 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "opencode-working-memory",
"version": "1.1.0",
"version": "1.1.1",
"description": "Advanced four-tier memory architecture for OpenCode with intelligent pressure monitoring and auto-storage governance",
"type": "module",
"main": "index.ts",