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

@vauban/agent-sdk

v0.8.2

Published

Vauban agent primitives: loop, budget, routing, HITL, permissions, tracking, durable execution

Downloads

402

Readme

@vauban-org/agent-sdk

Vauban agent primitives extracted from Command Center. Provides the core loop, budget tracking, provider routing, HITL approval, permissions, durable execution, and telemetry building blocks.

Quickstart

import {
  AgentLoop,
  createBudgetState,
  createProviderRouter,
} from "@vauban-org/agent-sdk";

const router = createProviderRouter({
  groqApiKey: process.env.GROQ_API_KEY,
});

const loop = new AgentLoop({
  agentId: "my-agent",
  agentVersion: "0.1.0",
  systemPrompt: "You are a helpful assistant.",
  provider: router,
  tools: myToolRegistry,
  budget: createBudgetState({ maxSteps: 10 }),
});

const result = await loop.run("Summarise the latest market news.");
console.log(result.finalMessage);

Public API

See CONTRACT.md for all signatures and the breaking-change policy.

| Export | Description | |--------|-------------| | AgentLoop | Multi-provider loop (Anthropic + Groq cascade) | | SdkAgentLoop | Anthropic-direct loop with permission enforcement | | AgentRegistry | Plugin registration + descriptor validation | | createBudgetState | Per-run budget counters | | createCoherenceDetector | Loop/stall detection | | createProviderRouter | Anthropic → Groq fallback router | | InMemoryApprovalStore | In-process HITL approval store | | sanitizeExternalInput | Prompt injection defence | | keepSafeOnly | Filter + return clean items | | recordOutcome | OTel span finalisation helper | | createAgentRunTracker | DB-backed token/cost accounting | | createBullMQRunner | BullMQ queue/worker/DLQ factory | | AGENT_IDS | Stable UUIDs per agent archetype | | mapScopesToSdkPermissions | JWT scope → SdkPermissions |

Architecture

@vauban-org/agent-sdk
├── loop/          AgentLoop (minimal-loop) + SdkAgentLoop (sdk-loop)
├── budget/        AgentBudgetState, CoherenceDetector, compactToolLog
├── router/        ProviderRouter (Anthropic + Groq)
├── hitl/          ApprovalChannel interface + InMemoryApprovalStore
├── permissions/   SdkPermissions, mapScopesToSdkPermissions
├── safety/        sanitizeExternalInput, keepSafeOnly
├── tracking/      OTel gen-ai spans + AgentRunTracker
├── durable/       BullMQRunner (queues, workers, DLQ, flow)
└── registry/      AgentRegistry + AGENT_IDS

Trading-NQ Paper Validation (Required Before Live)

Before flipping TRADING_MODE=live:

  1. Run 3 weeks of TRADING_MODE=paper cycles in production env
  2. Verify net_roi_pct stable (median > 0 across 21 days)
  3. Verify slippage_bps tolerable (P95 < 5 bps)
  4. Founder + RSO sign-off (per governance/founder-authority.md)

Workspace dep (Command Center)

"@vauban-org/agent-sdk": "workspace:*"