Graphorin API reference v0.7.0
Graphorin API reference / @graphorin/core
@graphorin/core
The dependency-free root package every other
@graphorin/*package builds on.
@graphorin/core defines the public type system and the cross-package contracts for the Graphorin framework. It contains no runtime: every implementation (sandbox, secrets store, memory store, provider adapters, agent runtime, workflow engine, server, …) lives in a sibling package and depends on the interfaces declared here.
- Status: v0.7.0 - type and contract surface for the v0.1 release line.
- License: MIT - © 2026 Oleksiy Stepurenko.
- Engines: Node.js 22+ (ESM only).
- Runtime dependencies: none.
- Peer dependency:
zod(^3.23 || ^4) - used for schema-typed values (stateSchema,inputSchema,outputSchema,EvalScorer, …). Bring whichever Zod version your application already uses.
Installation
pnpm add @graphorin/core zodWhat is in here?
The package is organized into four sub-modules with their own exports sub-paths so that consumers can import only what they need:
| Sub-path | Contents |
|---|---|
@graphorin/core | Re-export of the entire surface (types + contracts + utilities + channels). |
@graphorin/core/types | Plain TypeScript types: Message, AgentEvent, WorkflowEvent, RunContext, RunState, Usage, … |
@graphorin/core/contracts | Interfaces consumed by other @graphorin/* packages: Provider, MemoryStore, Tracer, Sandbox, … |
@graphorin/core/utils | Tiny dependency-free helpers: collect, mapStream, merge, withSignal, md5, xxhash, … |
@graphorin/core/channels | Workflow channel types (LatestValue, Reducer, Stream, Barrier, Ephemeral, AnyValue) plus the durable primitives sleepFor / sleepUntil, awaitExternal, and requestApproval. |
Naming notes
- The workflow primitive set in
@graphorin/core/channelsis Graphorin's own design:Directivefor control flow,Dispatchfor dynamic tasks,pause(value)for programmatic suspension, the channel kindsLatestValue,Reducer,Stream,Barrier,Ephemeral,AnyValue, and the durable-suspension primitivessleepFor/sleepUntil(durable timers),awaitExternal(awakeables), andrequestApproval(persisted approvals) that@graphorin/workflowexecutes. These names are part of the public API and must not be aliased to terms from other workflow libraries (a dedicated lint rule lands later in the release). SecretValueis exposed here as an interface, not a class: the runtime implementation lives in@graphorin/security. Downstream packages typing parameters asSecretValuetherefore depend only on@graphorin/core.
Stability
Every exported type is annotated with one of two TSDoc tags:
@stable- covered by semver guarantees for thev0.xline.@experimental- may change between minor versions; a deprecation note in theCHANGELOG.mdwill accompany every removal.
The whole @graphorin/core surface ships as @stable today - the @experimental tag is used in the packages where genuinely unsettled corners live (mcp, tools, security, skills), not here. The committed API report in etc/core.api.md is diffed in CI (check-api-report), so every change to this public surface is explicit in review.
Versioning
@graphorin/core follows the same lockstep release as the rest of the @graphorin/* packages while the framework is on the 0.x line.
Graphorin · v0.7.0 · MIT License · © 2026 Oleksiy Stepurenko · https://github.com/o-stepper/graphorin
Modules
| Module | Description |
|---|---|
@graphorin/core - types, contracts, and utilities for the Graphorin framework. Dependency-free root package every other @graphorin/* package depends on. | |
| channels | Workflow channel kinds + control-flow primitives. |
| contracts | Cross-package contracts for the Graphorin framework. |
| package.json | - |
| types | Plain TypeScript types for the Graphorin framework. |
| utils | Tiny dependency-free helpers used across the @graphorin/* packages. |