TS · 02

Top-level imports

Everything is re-exported from the package root. Values and types come from the same entry point - use import type for the type-only symbols.

imports.ts
import {
  // Core primitives
  Axon,
  Dendrite,
  Cortex,                 // back-compat alias of Dendrite

  // Synapse adapters + URL helpers
  MemorySynapse,
  DevSynapse,
  NatsSynapse,
  KafkaSynapse,
  synapseFromUrl,
  connectSynapse,

  // Registry stores
  MemoryRegistryStore,
  SqliteRegistryStore,
  PostgresRegistryStore,
  neuronRecord,

  // Pathway  -  per-trace event handle
  Pathway,
  PathwayClosedError,
  PATHWAY_TYPES,

  // Lifecycle hooks (onConnect / onRefresh / onSchedule)
  LifecycleHooks,

  // Neuron  -  contract + source factories
  clarify,
  isClarification,
  permissionRequest,
  neuron,                 // unified neuron(source, opts) factory
  mcpNeuron,
  ollamaNeuron,
  huggingFaceNeuron,
  openaiNeuron,
  anthropicNeuron,
  standardMcpServers,

  // Engram  -  shared memory (RECALL / IMPRINT)
  Engram,
  EngramBinding,
  EngramClient,
  InMemoryEngram,
  SqliteEngram,
  PostgresEngram,

  // Envelope + builders
  SignalType,
  createSignal,
  validateSignal,
  directedTo,
  encode,
  decode,
  reply,
  newTraceId,
  newEventId,
  newEngramId,
  taskSignal,
  agentOutputSignal,
  // ... one typed builder per SignalType, taskOfferSignal through
  // imprintedSignal (29 in total, from signals.ts)

  // Errors
  DendriteProtocolError,  // alias: CortexProtocolError
  EngramError,            // + EngramTimeout / EngramCancelled / EngramNotBound / EngramOverloaded
} from "@cosmonapse/sdk";

import type {
  Signal, Directed, Json, NeuronFn, NeuronHelpers,
  RegistryStore, Synapse, HandlerFilter,
  Hit, RecallResult, ImprintReceipt,
} from "@cosmonapse/sdk";

Have a feature in mind?

The protocol, SDKs, and CLI are still pre-1.0. If something here is missing, ambiguous, or wrong - open an issue and propose a change. Every breaking change is debated in DECISIONS.md first.