Files
oh-my-pi/packages/coding-agent/examples
can1357 7f1d071843 feat(coding-agent): added streaming NDJSON session persistence with crash-safe writes
Rewrote SessionManager to use streaming NDJSON writes with proper backpressure
handling instead of synchronous file appends. Key changes:

- SessionManager.open() and continueRecent() are now async for proper init
- Session writes use atomic rename pattern with fsync for crash safety
- Added flush() method for explicit control over pending write completion
- Large content blocks (>500KB) are truncated before writing to prevent OOM
- Images are replaced with placeholder thumbnails during persistence
2026-01-05 04:20:44 +01:00
..

Examples

Example code for omp-coding-agent SDK, hooks, and custom tools.

Directories

sdk/

Programmatic usage via createAgentSession(). Shows how to customize models, prompts, tools, hooks, and session management.

hooks/

Example hooks for intercepting tool calls, adding safety gates, and integrating with external systems.

custom-tools/

Example custom tools that extend the agent's capabilities.

Documentation