@streamoid/agent
v0.2.5
Published
Native (no-iframe) embeddable Streamoid agent chat panel. Host renders <AgentPanel adapters={…}/>. Prebuilt bundle — source + build live in the stream-agent repo.
Downloads
1,098
Readme
@streamoid/agent
Native (no-iframe) embeddable Streamoid agent chat panel. A host renders the
component and passes a typed adapters object; the agent renders, streams, and
navigates natively inside the host (no iframe, no postMessage).
import { AgentPanel } from "@streamoid/agent";
import "@streamoid/agent/style.css";
<AgentPanel
adapters={{
auth: { user: { id, email, name, specialization } },
workspace: { current: { id, name, role, country /* …full context */ } },
theme: { mode: "light" | "dark" },
config: { apiBase: "", hide: { sidepane: true, newBrief: true, notifications: true } },
navigation: { chatId, onChatIdChange },
}}
/>- Peer dependencies:
react,react-dom,@streamoid/ui,@streamoid/icons. - API base: use a relative base and proxy
/stream-agent/api/v1to the agent backend from the host (same-origin → cookies flow, no CORS).
⚠️ This package is a prebuilt bundle — do not edit dist/ here
The source and build live in the stream-agent repo (the chat shell is ~14,700 lines and is bundled from there). This package only ships the built artifact. To update:
# in stream-agent
cd frontend && npm run build:lib # produces frontend/dist-lib/
# copy the build into this package, then bump version + publish
cp frontend/dist-lib/{index.js,style.css,index.d.ts} <npm-components>/packages/agent/dist/
cd <npm-components>/packages/agent && npm version <x.y.z> && npm publish(Superseded the iframe-backed 0.1.0; that build's source remains in git history.)
