Skip to content

lean-agentic 0.3.3: agentdb ^3.6.0 (optional), lockfile, CI - #4

Merged
ruvnet merged 1 commit into
mainfrom
weaver/lean-agentic-agentdb3
Nov 6, 2026
Merged

ruvnet merged 1 commit into
mainfrom
weaver/lean-agentic-agentdb3

Conversation

@ruvnet

@ruvnet ruvnet commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Moves the lean-agentic npm package from agentdb ^1.5.5 to agentdb ^3.6.0 and releases 0.3.3.

Why: agentdb 1.x pulls @xenova/transformers → onnxruntime-web/onnx-proto/protobufjs, plus sharp and zod 3. That is 8 high advisories reaching every lean-agentic user (npm audit --omit=dev on a fresh lean-agentic@0.3.2 install). agentdb 3.6.0 drops that chain, and the same audit on this branch's lockfile reports 0 vulnerabilities.

Changes

  • Migration. Only the MCP server's agentdb_* tools and the stats://agentdb resource touch agentdb (src/agentdb-integration*.js, the CLI and the examples never import it). Those paths move to mcp/agentdb-tools.js and are ported to the 3.x API: a better-sqlite3-style createDatabase handle, EmbeddingService(config) with embedPassage/embedQuery, and WASMVectorSearch.cosineSimilarity. In 0.3.2 every agentdb tool failed with db.run is not a function.
  • Optional dependency. agentdb is now in optionalDependencies and loaded lazily with import(), since 3.x is ESM-only. If it is missing, the tools return a structured "install agentdb" result instead of throwing. engines stays >=18; agentdb itself needs >=20.9.
  • Embeddings. The default is transformers.js (all-MiniLM-L6-v2, 384 dimensions). LEAN_AGENTIC_EMBEDDINGS=mock switches to agentdb's deterministic offline embeddings.
  • Tests. Added real-import tests against agentdb 3.6.0 for init, store, search, learn, stats, the stats resource, MCP server routing and the missing-agentdb fallback. npm test now runs these plus the passing theorem suites. performance-theorems fails on main with a WASM "recursive use of an object" error, so it moves to npm run test:perf.
  • Lockfile. npm/lean-agentic/package-lock.json is now committed. The root .gitignore ignored all lockfiles, so this adds a narrow negation for this one.
  • CI (the repo had none): npm build, dist-sync check, tests, CLI smoke test, npm audit --omit=dev --audit-level=high and pack dry-run on Node 20 and 22. A second job runs cargo test on the 7 crates that compile. leanr-elab, leanr-eval-lite and runtime do not compile on main and are left out.
  • The MCP server now reports the package version instead of a hardcoded 0.3.0.

Not changed

  • The root package.json (unnamed, so not published) still lists agentdb ^1.3.10.
  • dist/node.js prints Initializing Lean-Agentic WASM... to stdout, which pollutes the MCP stdio stream. Fixing it needs a dist rebuild, so it is left out of this PR.

The published file list differs from 0.3.2 only by mcp/agentdb-tools.js.

🤖 Generated with claude-flow

agentdb 1.x pulled @xenova/transformers -> onnxruntime-web/onnx-proto/
protobufjs, plus sharp and zod 3: 8 high advisories reaching every
lean-agentic user. agentdb 3.6.0 drops that chain (npm audit --omit=dev: 0).

- agentdb is only used by the MCP server's agentdb_* tools and the
  stats://agentdb resource. Those paths now live in mcp/agentdb-tools.js,
  load agentdb lazily via dynamic import (3.x is ESM-only) and return a
  structured "install agentdb" result when it is missing.
- Ported to the agentdb 3.x API: createDatabase returns a better-sqlite3
  style handle (exec/prepare().run/get/all), EmbeddingService takes a config
  and exposes embedPassage/embedQuery, similarity via WASMVectorSearch.
  The 0.3.2 code failed on every call ("db.run is not a function").
- Embeddings default to transformers.js (all-MiniLM-L6-v2, 384d);
  LEAN_AGENTIC_EMBEDDINGS=mock uses AgentDB's offline embeddings.
- agentdb moves to optionalDependencies; engines stays >=18 (agentdb itself
  needs >=20.9, the fallback covers older Node).
- Real-import tests against agentdb 3.6.0 for every agentdb code path,
  plus the MCP server routing and the missing-agentdb fallback.
- npm test runs the agentdb suite and the passing theorem suites;
  performance-theorems (a pre-existing WASM aliasing failure) moves to
  test:perf.
- Commit npm/lean-agentic/package-lock.json so audits are reproducible.
- Add CI: npm build/test/audit on Node 20 and 22, cargo test on the crates
  that compile (leanr-elab, leanr-eval-lite, runtime do not yet).
- MCP server reports the package version instead of a hardcoded 0.3.0.

Co-Authored-By: claude-flow <ruv@ruv.net>
@ruvnet
ruvnet merged commit 66441a1 into main Nov 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant