Skip to content

Import Map

What It Is

The import map is the public boundary of @studnicky/dagonizer. It shows which subpath owns each runtime class, schema, contract, renderer, plugin utility, adapter base, and test harness.

Use this page when deciding where an application, plugin package, or test should import from. The root package is convenient for the dispatcher and common types; focused subpaths keep packages smaller and make intent obvious in code review.

How It Works

Dagonizer publishes stable package.json exports entries. Each entry is a barrel for one seam: builder authoring, runtime primitives, JSON-LD entities, plugin loading, visualization, stores, containers, channels, adapters, patterns, or tools.

That separation mirrors the architecture: JSON-LD documents describe topology by DAG and placement IRI, registries bind implementation references, and the dispatcher executes routed outputs. Imports should follow the same boundary.

Diagrams, Examples, and Outputs

The import map itself is not a DAG, so this reference page does not render a graph. The links below show where the exported surfaces appear in runnable code and generated diagrams:

What It Lets You Do

The import map lets teams choose the narrow package subpath for each public surface. Use it to avoid importing from the root barrel when a focused builder, runtime, validation, checkpoint, store, plugin, or visualization surface is available.

@studnicky/dagonizer ships every public surface through a dedicated package.json exports subpath. Each subpath is a focused barrel — import from the subpath that matches what you need rather than the root package for anything beyond the core Dagonizer class and its immediate satellites.

Code Samples

The table below is the contract. If a symbol is not available through one of these surfaces, application and plugin code should treat it as internal.

ts
import { Dagonizer } from '@studnicky/dagonizer';
import { DAGBuilder } from '@studnicky/dagonizer/builder';
import type { NodeInterface } from '@studnicky/dagonizer/types';
import { MermaidRenderer } from '@studnicky/dagonizer/viz';

API surface

SubpathRepresentative exportsWhat it's for
.Dagonizer, NodeStateBase, DAGError, constants, wire schemasRoot barrel: the dispatcher class, base node-state class, error taxonomy, and the JSON-LD schemas — the core engine surface
./typesDagonizerInterface, NodeInterface, DAGType, ExecuteOptionsTypeEvery public type and interface, no runtime classes — for application code that only needs type-level imports
./contractsNodeInterface, ClockProviderInterface, SchedulerProviderInterface, StoreInterfaceEvery adapter contract an application implements to swap a backend or author a node
./entitiesDAGSchema, DAGType, NodeContextType, ExecutionResultTypeJSON Schema 2020-12 definitions and their FromSchema-derived TypeScript types for every wire-shape entity
./errorsDAGErrorThe single error class and its DAGErrorInterface, distinguished by .code
./constantsNodeTypes, MetadataKeys, Output, GatherStrategyName, ScatterOutputConstant value+type pairs shared across the wire format and the engine
./lifecycleDAGLifecycleMachineThe DAG-run lifecycle finite-state-machine and its phase types
./runtimeClock, Scheduler, RealTimeScheduler, RetryPolicy, DottedPathAccessorTime and retry primitives: monotonic clock, scheduler, retry-with-backoff policy, dotted-path state access
./builderDAGBuilder, ScatterOptionsType, TypedEmbeddedDAGOptionsTypeThe fluent, compile-checked authoring API for constructing a DAGType
./validationValidator, WellFormedValidatorAjv-backed validators compiled once at module load against the package's own schemas
./checkpointCheckpoint, CheckpointRestoreAdapter, MemoryCheckpointStoreDeterministic-resume persistence: capture and recall a run's cursor and state
./testingVirtualClockProvider, VirtualScheduler, LoopbackChannel, DagConformanceTest-only doubles for the clock/scheduler contracts and a DAG-conformance test harness
./coreMonadicNode, PlaceholderNode, Batch, RoutedBatchPluggable execution primitives: the node base class applications extend and the batch/item entities they operate on
./vizMermaidRenderer, JsonLdRenderer, CytoscapeRenderer, CytoscapeGraph, CompositeLayout, MermaidExplorerDAG visualization: Mermaid, JSON-LD, and Cytoscape renderers, layout helpers, plus an interactive explorer widget
./storeBaseStore, MemoryStore, TypedStore, StoreInterfaceShared key-value store applications extend for cross-node or cross-run state
./containerDagContainerBase, DagHost, DagTask, DagOutcomeEmbedded-DAG container surface: channel dispatch and worker-container transport contracts
./channelsInMemoryChannel, StreamChannel, StreamCursorMessage channels: in-memory transport and resumable streaming channels with cursor tracking
./runnerDagRunner, TriggerInterface, OnceTrigger, CliTrigger, EventTrigger, RequestTriggerLong-running DAG host: register triggers (once, CLI, event, HTTP request) that invoke a registered DAG
./progressEventBus, SseStreamProgress and observability event bus, plus a Server-Sent-Events stream adapter for the same envelope
./adapterBaseAdapter, OpenAiCompatibleAdapter, LlmAdapterRegistry, LlmAdapterCascadeLLM adapter contract surface: chat/tool schemas, streaming chunk types, capability descriptors, and cascading multi-backend dispatch
./patternsAgentTraceProducer, BuildChatRequestNode, CallModelNode, BuildToolWorksetsNode, MonadicNode, DagStreamProducerPattern-tier base classes, trace producers, and stream producers applications extend for LLM loops and routed streaming
./toolToolInterface, HttpTransport, ToolErrorTool contract surface for LLM function/tool calling: the interface a tool implements plus HTTP transport and error types
./dagDAGDocumentJSON-LD DAG document loading and parsing outside the dispatcher
./pluginPluginDiscovery, PluginLoader, PluginSpecifierPlugin discovery and loading for the plugin registry described in the Plugins
./observeObservedDagA Dagonizer subclass with structured logging and optional substrate timing wired into every lifecycle hook, for drop-in observability
./viz/explorer.css-Stylesheet asset for MermaidExplorer; import it directly, it has no JS exports

Details for Nerds

Type-only imports belong on ./types or ./contracts. Runtime helpers belong on the surface that owns the behavior: ./builder for authoring, ./runtime for clocks/retry/accessors, ./validation for schema validation, ./viz for rendering, and ./plugin for plugin loading/discovery.

Watched over by the Order of Dagon.