Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
fbf4d44
refactor: restructure to match Python powermem directory layout
webup Apr 2, 2026
5cd853f
feat: config system — configs, config-loader, settings, version
webup Apr 2, 2026
10d4113
feat: storage module — factory, adapter, configs
webup Apr 2, 2026
886cdc4
feat: integrations module — embeddings/llm/rerank base, factory, config
webup Apr 2, 2026
97350fb
feat: intelligence module — optimizer, evaluator, manager, plugin
webup Apr 2, 2026
ac9c543
feat: prompts module + utils expansion (filter-parser, stats, io)
webup Apr 2, 2026
f537e31
feat: minimal CLI + Phase A complete
webup Apr 2, 2026
41166ee
feat: full CLI — stats, manage, interactive shell, CLI utils
webup Apr 2, 2026
d5ebf40
feat: Phase B+C — agent module, user memory, graph store, full CLI
webup Apr 2, 2026
f97884c
fix: resolve lint errors in agent module
webup Apr 2, 2026
6c6287a
feat: dashboard server + BDD test suite for CLI and UI
webup Apr 3, 2026
3a4e5c2
test: data correctness tests proving input→storage→output fidelity
webup Apr 3, 2026
74883b5
fix: add @types/express for CI type-check
webup Apr 3, 2026
87bae2e
feat: comprehensive SeekDB test suite + macOS CI job
webup Apr 3, 2026
92b73a3
ci: use macos-14 (ARM64) for SeekDB tests — matches bundled darwin-ar…
webup Apr 3, 2026
a2f9d01
ci: fix SeekDB — set DYLD_LIBRARY_PATH on macOS, add Linux x64 downlo…
webup Apr 3, 2026
922744c
ci: fix SeekDB to actually run tests (not just skip)
webup Apr 3, 2026
741db83
fix: SeekDB embeddingFunction:null + libaio1t64 for Ubuntu 24.04
webup Apr 3, 2026
e8dcec2
ci: remove seekdb verification step that crashes on client.close()
webup Apr 3, 2026
48c5f30
fix: SeekDB test guards skip close() to avoid SIGABRT, simplify metad…
webup Apr 3, 2026
84b857f
fix: base64-encode metadata in SeekDBStore to bypass C engine JSON pa…
webup Apr 3, 2026
ea7c1f2
fix: SeekDB e2e guard — align with working unit test pattern + sequen…
webup Apr 3, 2026
a30d441
fix: run seekdb test files sequentially to avoid concurrent init
webup Apr 3, 2026
159fdf3
fix: guard afterAll close() calls in seekdb-e2e tests
webup Apr 3, 2026
7ba321e
fix: seekdb-e2e — single shared Memory instance (embedded engine is s…
webup Apr 3, 2026
20772f6
fix: resolve SeekDB Linux CI — fix package exports path + dynamic cac…
webup Apr 3, 2026
67cdb78
fix: symlink libaio.so.1t64 → libaio.so.1 for Ubuntu 24.04 compat
webup Apr 3, 2026
5b63e3a
docs: update all docs to reflect v0.3.0 full Python parity
webup Apr 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
119 changes: 115 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:

jobs:
# ─── Unit + SeekDB tests across Node versions ────────────────────────
# ─── Unit + Integration + Regression tests ───────────────────────────
test:
name: Test (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
Expand All @@ -33,9 +33,120 @@ jobs:
- name: Unit tests
run: npm test

- name: SeekDB tests (auto-skip if bindings unavailable)
run: npx vitest run tests/seekdb-store.test.ts tests/seekdb-integration.test.ts
continue-on-error: true
# ─── SeekDB tests (macOS ARM64 — bindings bundled as darwin-arm64) ───
test-seekdb:
name: SeekDB (macOS ARM64)
runs-on: macos-14
env:
# Propagate library path to ALL steps including vitest subprocesses
DYLD_LIBRARY_PATH: ${{ github.workspace }}/node_modules/@seekdb/js-bindings:${{ github.workspace }}/node_modules/@seekdb/js-bindings/libs

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install

- name: Verify SeekDB native binding loads
run: |
echo "DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH"
node -e "
const seekdb = require('@seekdb/js-bindings');
seekdb.getNativeBindingAsync().then(b => {
console.log('SeekDB binding loaded OK');
}).catch(e => {
console.error('FAILED:', e.message);
process.exit(1);
});
"

- name: Run SeekDB tests
run: npm run test:seekdb
timeout-minutes: 5

# ─── SeekDB tests (Linux x64 — download bindings + install libaio) ──
test-seekdb-linux:
name: SeekDB (Linux x64)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 20

- name: Install system dependencies
run: |
sudo apt-get update && sudo apt-get install -y libaio1t64 || sudo apt-get install -y libaio1 || true
# Ubuntu 24.04 ships libaio.so.1t64 but SeekDB expects libaio.so.1
if [ ! -f /usr/lib/x86_64-linux-gnu/libaio.so.1 ] && [ -f /usr/lib/x86_64-linux-gnu/libaio.so.1t64 ]; then
sudo ln -s libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
echo "Created libaio.so.1 symlink"
fi

- name: Install dependencies
run: npm install

- name: Download SeekDB native bindings
run: |
node -e "
// Use filesystem path to bypass package.json exports restriction
const downloadPath = require.resolve('@seekdb/js-bindings').replace('seekdb.js', 'download.js');
const { ensureBindingsDownloaded } = require(downloadPath);
ensureBindingsDownloaded().then(dir => {
console.log('Downloaded to:', dir);
const fs = require('fs');
const path = require('path');
// Verify libseekdb.so was extracted (download.js extractAllTo should handle this)
const soPath = path.join(dir, 'libseekdb.so');
if (!fs.existsSync(soPath)) {
console.log('libseekdb.so not found, extracting from zip...');
const zipPath = path.join(dir, 'seekdb-js-bindings-linux-x64.zip');
if (fs.existsSync(zipPath)) {
const AdmZip = require('adm-zip');
const zip = new AdmZip(zipPath);
zip.extractEntryTo('libseekdb.so', dir, false, true);
console.log('Extracted libseekdb.so');
}
}
const files = fs.readdirSync(dir).filter(f => f.endsWith('.so') || f.endsWith('.node'));
console.log('Native files:', files);
if (!files.includes('seekdb.node')) { console.error('seekdb.node missing!'); process.exit(1); }
if (!files.includes('libseekdb.so')) { console.error('libseekdb.so missing!'); process.exit(1); }
}).catch(e => {
console.error('Download failed:', e.message);
process.exit(1);
});
"

- name: Verify SeekDB binding loads
run: |
# Find the cache dir dynamically (contains seekdb.node + libseekdb.so)
CACHE_DIR=$(find ~/.seekdb -name 'seekdb.node' -exec dirname {} \; 2>/dev/null | head -1)
echo "Cache dir: $CACHE_DIR"
ls -la "$CACHE_DIR"/*.so "$CACHE_DIR"/*.node 2>/dev/null || true
export LD_LIBRARY_PATH="$CACHE_DIR:$LD_LIBRARY_PATH"
node -e "
const seekdb = require('@seekdb/js-bindings');
seekdb.getNativeBindingAsync().then(b => {
console.log('SeekDB binding loaded OK');
}).catch(e => {
console.error('FAILED:', e.message);
process.exit(1);
});
"

- name: Run SeekDB tests
run: |
CACHE_DIR=$(find ~/.seekdb -name 'seekdb.node' -exec dirname {} \; 2>/dev/null | head -1)
export LD_LIBRARY_PATH="$CACHE_DIR:$LD_LIBRARY_PATH"
npm run test:seekdb
timeout-minutes: 5

# ─── Build verification ──────────────────────────────────────────────
build:
Expand Down
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Changelog

## v0.3.0 — Full Python Parity (2026-04-03)

Complete TypeScript replication of Python `oceanbase/powermem`. 89 source files, 10 modules, 504 tests.

### Directory Restructure
- Reorganized from flat `provider/native/` to Python-matching module layout
- Tests restructured into `unit/`, `integration/`, `regression/`, `e2e/`, `bdd/`
- Deleted legacy `src/server/` (Python subprocess bridge)

### New Modules
- **Config system**: `configs.ts` (Zod schemas), `config-loader.ts` (env auto-detection), `settings.ts`, `version.ts`
- **Storage module**: `VectorStoreFactory` (provider registry), `StorageAdapter`, typed configs
- **Integrations**: `embeddings/`, `llm/`, `rerank/` base interfaces + factory pattern
- **Intelligence**: `MemoryOptimizer` (exact + semantic dedup, LLM compression), `ImportanceEvaluator`, `IntelligenceManager`
- **Prompts**: importance evaluation, optimization, query rewrite, user profile, graph extraction/update/deletion
- **Utils**: `filter-parser`, `stats` (byType, growth trend, age distribution), `io` (JSON/CSV)
- **CLI**: `pmem config show|validate|test`, `pmem memory add|search|list|get|delete|delete-all`, `pmem stats`, `pmem manage backup|restore|cleanup`, `pmem shell` (interactive REPL)
- **Dashboard**: Express server + HTML SPA (overview stats/charts, memories table, settings, dark/light theme)
- **Agent module**: `AgentMemory`, 7 enums, scope/permission/collaboration strategy interfaces, `ScopeController`, `PermissionController`, `AgentFactory`
- **User memory**: `UserMemory` (profile-aware search), `QueryRewriter`, `SQLiteUserProfileStore`
- **Graph store**: `GraphStoreBase` interface, graph prompts

### SeekDB Improvements
- `embeddingFunction: null` to disable auto-vectorization (pass pre-computed embeddings)
- Base64-encoded metadata to bypass C engine JSON parser limitations
- Sequential test execution to avoid concurrent embedded engine init
- CI: macOS ARM64 (bundled bindings) + Linux x64 (S3 download + libaio symlink)

### Tests (504 total)
- 370 unit/integration/regression (Node 18/20/22)
- 63 SeekDB (macOS ARM64 + Linux x64)
- 21 e2e with real Ollama models
- 50 BDD (19 CLI + 16 dashboard UI + 15 data correctness)

### CI (7 jobs, all green)
- Test Node 18/20/22 (Ubuntu)
- SeekDB macOS ARM64 (macos-14)
- SeekDB Linux x64 (Ubuntu, S3 download + libaio1t64 symlink)
- Build (CJS + ESM + DTS + CLI)
- E2E Ollama (Ubuntu)

---

## v0.2.0 — Feature Enhancement (2026-04-01)

### P0 — API Layer
Expand Down
Loading
Loading