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

@robojs/code

v0.1.0

Published

SDK for building agentic coding experiences with WebContainer and LangGraph

Readme

@robojs/code

SDK for building agentic coding experiences with WebContainer and LangGraph.

Overview

@robojs/code is an SDK designed for building agentic coding experiences, optimized for:

  • In-browser execution (StackBlitz WebContainer) with filesystem + terminal + long-running sessions
  • LangGraphJS-native orchestration (state annotations, reducers, ToolNode, interrupt/resume)
  • Robo-aware workflows (detect Robo projects, run robo build, optional @robojs/mock validation)
  • Verification-driven autonomy ("done" means acceptance criteria satisfied and verification passes)

Installation

npm install @robojs/code
# or
pnpm add @robojs/code

Exports

Main Export

import {
	// Types
	ExecutionProvider,
	LocalServiceDiscovery,
	LLMProvider,
	AgentPolicy,
	AgentEvent,
	StreamOptions,
	RunMode,
	// ... and more

	// Values
	CodeAgentError,
	DEFAULT_POLICY,
	DEFAULT_STREAM_OPTIONS,
	codeLogger
} from '@robojs/code'

Types-only Export

import type {
	FileChange,
	FileDiff,
	ProjectProfile,
	AcceptanceCriteria,
	ProjectIndex,
	ProjectOverview,
	RunMeta
} from '@robojs/code/types'

Key Types

ExecutionProvider

The authoritative interface for filesystem and command execution:

interface ExecutionProvider {
	// File operations
	readFile(path: string): Promise<string>
	writeFile(path: string, content: string): Promise<void>
	deletePath(path: string, opts?: { recursive?: boolean }): Promise<void>
	exists(path: string): Promise<boolean>
	readdir(path: string, opts?: { recursive?: boolean }): Promise<DirEntry[]>
	// ... more file operations

	// Command execution (no shell interpolation)
	run(command: string, args: string[], opts?: RunOptions): Promise<RunResult>
	runStream(command: string, args: string[], opts?: RunOptions): AsyncIterable<TerminalChunk>

	// Long-running sessions
	startSession(command: string, args: string[], opts?: RunOptions): Promise<TerminalSessionHandle>
	stopSession(handle: TerminalSessionHandle): Promise<void>
	streamSession(handle: TerminalSessionHandle): AsyncIterable<TerminalChunk>
}

BrandedModelAlias

Client-side model selection aliases (capability order ascending):

type BrandedModelAlias =
	| 'Sage' // Entry-level capable model
	| 'Great Sage' // Mid-tier capable model
	| 'Raphael' // High capability model
	| 'Words of the World' // Most capable model (highest tier)

AgentPolicy

Security and execution policy:

interface AgentPolicy {
	autoApprove: boolean
	maxIterations: number
	commandAllowlist: string[]
	commandArgPolicy?: CommandArgPolicy
	denyPaths?: string[]
	maxFileWriteBytes?: number
	// ... more policy options
}

AgentEvent

UI streaming contract:

type AgentEvent =
	| { type: 'start'; runId: string; instruction: string }
	| { type: 'plan'; steps: TaskStep[] }
	| { type: 'tool_call'; source: 'core'; name: string; args: unknown }
	| { type: 'question'; runId: string; text: string; choices?: QuestionChoice[] }
	| { type: 'approval_required'; runId: string; changes: FileChange[]; diffs?: FileDiff[] }
	| { type: 'complete'; summary: string; changes: FileChange[] }
// ... more event types

Run Modes

  • explain: Answer questions grounded in project facts (no edits)
  • plan: Produce acceptance criteria + plan, ask clarifying questions (no edits)
  • execute: Implement + verify + iterate until acceptance criteria pass or budget exceeded

Error Handling

import { CodeAgentError } from '@robojs/code'

try {
	// agent operations
} catch (error) {
	if (CodeAgentError.isCodeAgentError(error)) {
		console.log(error.code) // 'POLICY_VIOLATION', 'BUDGET_EXCEEDED', etc.
		console.log(error.recoverable)
	}
}

Documentation

License

MIT