@dornick/core
v0.1.0
Published
Dornick — the in-browser agent SDK runtime. Browser-first, framework-agnostic.
Readme
@dornick/core
The Dornick runtime — the in-browser agent SDK.
VFS-shaped tool loop, transports, DOM binder, Shadow-DOM chat UI, Stagehand-style primitives (act/extract/observe), compaction, planning gate, guardrails, behavioral triggers, MCP client + server.
This is the runtime that powers Dornick. The Dornick class is the public surface; everything else (loop, transport, VFS mounts, primitives) is composable underneath if you want to wire your own pipeline.
Install
npm i @dornick/coreUse — form replacement
import { Dornick, BUILTIN_SKILLS } from "@dornick/core";
const dornick = new Dornick({
config: signupConfig,
transport: { mode: "browser", provider: "anthropic", apiKey: "sk-ant-...", model: "claude-sonnet-4-6" },
skills: BUILTIN_SKILLS,
});
dornick.attach(document.querySelector("form#signup")!);Use — page companion
import { Dornick } from "@dornick/core";
const dornick = new Dornick({
config: companionConfig,
transport: { mode: "browser", provider: "anthropic", apiKey: "...", model: "claude-sonnet-4-6" },
ui: { host: document.getElementById("chat")!, hideForm: false },
});
dornick.mount("/host/kb", async (path) => fetch(`/api/kb/${path}`).then(r => r.text()));
dornick.attach(document.getElementById("page-content")!);
const { answer } = await dornick.observe("What's on this page?");
const { data } = await dornick.extract({ schema: { plan_tier: "string" } });
await dornick.act("Highlight the SOC-2 row in the spec table.");What it exports
Dornick, BrowserTransport, AgentLoop, DEFAULT_TOOLS, dispatchTool, Compactor, PlanningGate, MemoryStore, LocalStorageStore, actPrimitive/extractPrimitive/observePrimitive, all *Mount VFS handlers, DornickMcpServer, McpClientMount, all guardrails, all behavioral triggers, slash-command dispatcher, bindForm, ChatRenderer, dehydrateDom, plus full TypeScript types.
Re-exports HookRegistry from @dornick/hooks and defineSkill + 8 built-in skills from @dornick/skills.
Links
- Repo & root README — start here
- Documentation — concepts, how-to, API
- API reference — every export
- Examples — page-companion, script-tag-signup, resume-autofill, react-onboarding
License
MIT — © Dipankar Sarkar
