@aibind/core
v0.15.0
Published
Shared internal utilities for @aibind packages
Downloads
1,056
Readme
@aibind/core
Shared core utilities for @aibind packages. Framework-agnostic controllers, tree-structured conversation history, durable stream infrastructure, and project management.
Install
npm install @aibind/coreMost users should install a framework package (
@aibind/sveltekit,@aibind/nuxt,@aibind/nextjs,@aibind/solidstart) instead, which includes this package automatically.
What's Inside
Controllers
Framework-agnostic controllers that power all framework packages:
StreamController— manages streaming text state, abort/resume, SSE reconnectionStructuredStreamController— streaming JSON parsing with schema validationAgentController— multi-step tool-calling agent state
Tree-Structured Conversation History
MessageTree<M>— low-level tree data structure with full branching supportChatHistory<M>— high-level wrapper for append, edit, regenerate, and navigate alternatives
Durable Streams
Server-side infrastructure for resumable AI streams:
MemoryStreamStore— in-memory stream chunk storage with TTLcreateDurableStream— pipes async iterables through a store, returns SSE ResponsecreateResumeResponse— resume from a given sequence number- SSE utilities:
formatSSE,formatSSEEvent,consumeSSEStream
Server Handler
createStreamHandler— generic Web Request/Response handler for/streamand/structuredendpointsServerAgent— server-side agent with tools and multi-step loops
Project Management
Project— Claude-like project context with instructions, knowledge, and multi-conversation management
Documentation
Full documentation, API reference, and guides: aibind.dev
License
MIT
