ECC/tests/lib
Affaan Mustafa bae1129209
feat: add SQLite state store and query CLI (#510)
* feat: add SQLite state store and ECC status CLI

* fix: replace better-sqlite3 with sql.js to eliminate native module CI failures

better-sqlite3 requires native C++ compilation (node-gyp, prebuild-install)
which fails in CI across npm/pnpm on all platforms:
- npm ci: lock file out of sync with native transitive deps
- pnpm: native bindings not found at runtime
- Windows: native compilation fails entirely

sql.js is a pure JavaScript/WASM SQLite implementation with zero native
dependencies. The adapter in index.js wraps the sql.js API to match the
better-sqlite3 interface used by migrations.js and queries.js.

Key implementation detail: sql.js db.export() implicitly ends active
transactions, so the adapter defers disk writes (saveToDisk) until
after transaction commit via an inTransaction guard flag.

createStateStore is now async (sql.js requires async WASM init).
Updated status.js, sessions-cli.js, and tests accordingly.
2026-03-16 01:32:21 -07:00
..
install-config.test.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
install-lifecycle.test.js feat: strengthen install lifecycle and target adapters (#512) 2026-03-15 21:47:31 -07:00
install-manifests.test.js feat: wire manifest resolution into install execution (#509) 2026-03-15 21:47:22 -07:00
install-request.test.js feat: wire manifest resolution into install execution (#509) 2026-03-15 21:47:22 -07:00
install-state.test.js feat: strengthen install lifecycle and target adapters (#512) 2026-03-15 21:47:31 -07:00
install-targets.test.js feat: strengthen install lifecycle and target adapters (#512) 2026-03-15 21:47:31 -07:00
orchestration-session.test.js feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
package-manager.test.js Fix copilot-setup-steps.yml and address PR review comments 2026-02-18 07:22:05 +00:00
project-detect.test.js feat: automatic project type and framework detection (#293) 2026-03-02 22:07:10 -08:00
resolve-formatter.test.js perf(hooks): use direct require() instead of spawning child process 2026-03-11 10:45:27 +09:00
session-adapters.test.js feat: expand session adapter registry with structured targets 2026-03-14 19:09:26 -07:00
session-aliases.test.js Fix copilot-setup-steps.yml and address PR review comments 2026-02-18 07:22:05 +00:00
session-manager.test.js fix: accept shorter mixed-case session IDs (#408) 2026-03-12 23:29:50 -07:00
shell-split.test.js fix(hooks): allow tmux-wrapped dev server commands (#321) 2026-03-07 14:47:49 -08:00
skill-evolution.test.js feat: add skill evolution foundation (#514) 2026-03-15 21:47:39 -07:00
skill-improvement.test.js feat: self-improving skills loop — observe, inspect, amend, evaluate 2026-03-14 23:21:18 -07:00
state-store.test.js feat: add SQLite state store and query CLI (#510) 2026-03-16 01:32:21 -07:00
tmux-worktree-orchestrator.test.js test: fix cross-platform orchestration regressions 2026-03-12 15:46:50 -07:00
utils.test.js fix(hooks): scrub secrets and harden hook security (#348) 2026-03-07 14:47:31 -08:00