Releases: Jason-Vaughan/ClawBridge
Releases · Jason-Vaughan/ClawBridge
v1.5.0 — Tools extension point (CLAWBRIDGE_TOOLS_MODULE)
First public release with an extension seam. Set CLAWBRIDGE_TOOLS_MODULE to an absolute path pointing at a Node module that exports { init, handleToolsRoute, getToolsHealth, close } and the bridge will mount it under /tools/*, merge its health into /health, and close it on shutdown. Full contract: docs/tools-extension.md.
Added
- Tools extension point. Optional `CLAWBRIDGE_TOOLS_MODULE` env var points at a Node module implementing `{ init, handleToolsRoute, getToolsHealth, close }`. The bridge lazy-loads it, dispatches `/tools/*` to it, merges its health under the `tools` key of `/health`, and awaits `close()` on SIGTERM/SIGINT. Absent the env var the bridge runs as a pure PTY broker.
- Fixture `bridge/tests/fixtures/mock-tools-extension.js` and end-to-end suite `bridge/tests/tools-extension.test.js` (21 tests) covering dispatch, `/health` merge, bridge-level auth, decline → 404, init-delay race, single-close on repeated signals, all three error paths, and graceful degradation across every invalid-loader branch.
Changed
- Server startup is now async — `init()` is awaited before `server.listen()`. If init rejects, the extension is disabled and the bridge starts anyway.
- `shutdown()` is idempotent and async — guarded against repeated SIGTERM/SIGINT so `close()` runs exactly once. The extension reference is nulled before the awaited close so late `/tools/*` requests fall through to 404.
Install
```
npm install @jason-vaughan/clawbridge
```
Requires Node 18+.