npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xandreed/sdk-core

v0.5.1

Published

efferent SDK — the pure Effect.ts domain: agent loop, context tree, compaction, multi-provider router contracts, approval. Ports + use cases, no IO. Runtime-agnostic.

Readme

@xandreed/sdk-core

The pure domain of the efferent agent — entities, ports, and use cases. Runtime dependencies are effect and @effect/ai (provider-agnostic) and nothing else.

This is the inward end of the ports & adapters architecture: clisdk-adapterssdk-core. sdk-core imports nothing from its siblings — it declares what the agent does as Effects over Context.Tag ports; the adapters supply how.

What's inside

  • entities/ — Schema-backed types the loop manipulates: Conversation (the AgentMessage union, Checkpoint), AgentContext (context-tree nodes), AgentEvent (the wire event union), Model (selections, roles, the generated context-window catalogue), Settings, Scope, Skill, AgentDefinition, AgentHooks, Job (the control-plane submission unit), Memory, Directive. Pure values, no IO.
  • ports/Context.Tag services for everything the domain needs from outside: ConversationStore, ContextTreeStore, FileSystem, Shell, Http, WebSearch, AuthStore, SettingsStore, ModelRegistry, LlmInfo, UtilityLlm, Approval, AuthFlow. Each port file pairs its tagged errors with the Tag.
  • usecases/ — Effects over the ports: the agent loop (runAgent.ts, agentLoop.ts, promptMapping.ts, agentPhase.ts); the orchestration substrate lifted here from the CLI — agentBus.ts (the Supervisor, exported as type Supervisor = AgentBus; not a Context.Tag port but a per-session stateful value carrying the event sink, threaded via makeAgentBus), buildScopeRuntime.ts (sub-agent spawning over the context tree), codingToolkit.ts (the coding tools), discoverScopeTree.ts, loadTools.ts, schedule.ts, staleness.ts, parseFrontmatter.ts; the loop primitives runContext.ts + tokenBudget.ts; context management (handoff.ts, compaction.ts, compactionContent.ts); approval (autoApproval.ts); and helpers (generateTitle.ts). (Workspace-shaped discovery — loadSkills.ts, loadAgents.ts, loadMemory.ts, teamAgents.ts — lives in efferent.)
  • prompts/ — system-prompt strings/functions: handoff.ts, title.ts, plus the shared fleet/scope pieces lifted from the CLI — sections.ts (subAgentsSection / coordinationSection / renderAgentsSection / renderMemorySection) and scopeAgent.ts (renderScopeSystemPrompt). (The root coder prompt coder.ts lives in efferent.)

Rules

  • Never import from @xandreed/sdk-adapters or the CLI. If a use case needs a capability, declare a port — the only SDK allowed here is @effect/ai (provider packages live in adapters).
  • No try/catch/throw/.catch() in src/ — error handling is Effect's typed errors (Effect.fail, Effect.catchTag, …), enforced by scripts/banTryCatch.ts in bun run typecheck.
  • camelCase files export functions; PascalCase files export types / Context.Tag classes. Tags carry a fully-qualified id: Context.Tag("@xandreed/sdk-core/FileSystem").

Part of efferent — an agent runtime on Effect.ts + Bun.