@obversa/memory-simple keeps memory files in one process, with the same
commands, limits and error codes as every other adapter. Use it in tests
and in runs that don’t need memory to outlive the process; for memory that
survives a restart, use Git Memory.
Install
@obversa/obversa.
Requirements
Nothing beyond Node.js.Quickstart
Create the adapter with a scope, write a note and read it back:examples/memory-simple.ts (excerpt)
view, create, str_replace, insert, delete and rename. Pass it to
run(job, { memory }) and every job reads it as ctx.memory. Run the
whole file with npx tsx memory-simple.ts:
Output
Options
Errors
- The port’s error codes, listed on Memory port.
- A write past a limit removes the earliest-written files until it fits, never the file being written.
API
createSimpleMemory(options): aMemoryin one process. Quickstart.SimpleMemoryOptions: its options.
Next steps
- Memory adapters: the three adapters side by side.
- Memory mechanics:
ground,curateandconsolidateover this adapter.