Registry / database / lyo-kernel

lyo-kernel

JSON →
library0.1.7jsnpmunverified

SQLite-based reducer kernel for evidence-backed agent learning protocols. Version 0.1.7 is the initial experimental release targeting Node.js >=24. Reduces agent trajectories into compact SQLite databases for traceable learning and debugging. Differentiates from general-purpose reducers by focusing on auditability, deterministic replay, and schema-enforced evidence logs. Development is early-stage with likely breaking changes.

npm install lyo-kernel
INSTALL
IMPORT
SIG · LYO-KERNEL
L
lyo-kernel
databasejavascriptv0.1.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Kernel
import { Kernel } from 'lyo-kernel'
const Kernel = require('lyo-kernel')
ESM-only package; CommonJS require fails unless in .mjs context with --experimental-require-module
createKernel
import { createKernel } from 'lyo-kernel'
import createKernel from 'lyo-kernel'
Not a default export; named export only
Evidence
import { Evidence } from 'lyo-kernel'
Import for type definitions if using TypeScript; runtime class is available

Initialize an SQLite kernel, record an evidence entry, and query recent thoughts.

import { Kernel, createKernel } from 'lyo-kernel'; const kernel = createKernel({ dbPath: './agent.db' }); await kernel.initialize(); const evidence = { action: 'thought', payload: { content: 'Analyzing context' }, timestamp: Date.now() }; await kernel.recordEvidence(evidence); const results = await kernel.query({ type: 'thought', limit: 10 }); console.log(results);
Debug
Known issues
breakingNode.js >=24 is required; older versions cause runtime errors.
fix
Upgrade Node.js to v24 or later.
affects: <24.0.0
gotchaDatabase file is created synchronously; simultaneous access can cause lock errors.
fix
Use a single Kernel instance per process or implement external lock.
affects: >=0.1.0
deprecatedMethod 'recordEvidence' may be renamed to 'pushEvidence' in future versions.
fix
Use pull the latest and update calls if API changes.
affects: <=0.1.7
gotchaQueries with 'limit: -1' throw because of SQLite constraint.
fix
Use 'limit: 0' for no limit or omit the limit field.
affects: >=0.1.0
Errors
Common errors & fixes
TypeError: lyo-kernel is not a function
Default import instead of named import.
fix
Use import { createKernel } from 'lyo-kernel'; instead of import createKernel from 'lyo-kernel';
Error: Cannot find module 'lyo-kernel'. Did you mean to import 'lyo-kernel'?
Running in CommonJS module without necessary flags.
fix
Add "type": "module" to package.json or use .mjs file extension, and set --experimental-require-module if needed.
SqliteError: database is locked
Multiple processes or kernel instances accessing the same DB file.
fix
Ensure only one Kernel instance writes to the same .db file at a time.
Upgrade
Version history
0.1.7latest on npm
Audit
Dependencies
better-sqlite3requiredSynchronous SQLite bindings required for kernel operations
Agent activity
4 hits · last 30 days
node
4
Resources
lyo-kernel — npm install lyo-kernel · libregistry