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

@one-agent/agent-extension

v0.0.3

Published

Optional delegated agent() extension for ONE.

Downloads

249

Readme

@one-agent/agent-extension

Optional delegated agent() extension for ONE.

This package implements the optional Agent Interface Extension described in the Re in Act specification. It lets code running inside a Reason-able Action Space (RAS) delegate a sub-task to a fully independent agent process over ACP, wait for the result, and continue — without escaping the bounded execution model.

Install

npm install @one-agent/agent-extension
# or
pnpm add @one-agent/agent-extension

Quick start

import { agent } from "@one-agent/agent-extension";

const result = await agent("Summarise the diff in /tmp/patch.diff");

if ("error" in result) {
  console.error(result.error);
} else {
  console.log(result.data.text);
  console.log("Steps taken:", result.data.trajectory.steps.length);
}

API

agent(prompt, config?)

agent(prompt: string, config?: AgentConfig): Promise<AgentResult>

Delegates prompt to a child agent process and returns once it is done.

AgentConfig

| Field | Type | Default | Description | |---|---|---|---| | command | string | "claude-agent-acp" | ACP server binary to spawn | | args | string[] | [] | Extra CLI args for the ACP server | | env | Record<string, string> | — | Additional env vars for the child process | | model | string | "default" | Model ID passed to the ACP provider | | mode | string | — | Optional mode hint forwarded to the ACP provider | | system | string | — | Extra system prompt appended to the child agent's context | | budget.maxSteps | number | 40 | Max agentic steps before the run is stopped | | budget.maxMinutes | number | — | Wall-clock timeout in minutes | | budget.maxOutputTokens | number | 4096 | Max output tokens per step | | budget.maxRetries | number | 2 | Retry budget when on_error is "retry_within_budget" | | on_error | "fail" \| "return_error" \| "retry_within_budget" | "return_error" | Error handling policy | | session.cwd | string | process.cwd() | Working directory for the child agent | | session.mcpServers | McpServerConfig[] | [] | MCP servers available to the child agent | | persistSession | boolean | — | Keep the ACP session alive between calls | | extension.enabled | boolean | — | Inject injectSystemPrompt / injectTools into the child | | extension.injectSystemPrompt | string \| false | — | System prompt fragment to prepend | | extension.injectTools | McpServerConfig[] \| false | — | Extra MCP servers to merge into the session |

AgentResult

type AgentResult =
  | { data: { text: string; trajectory: AgentTrajectory } }
  | { error: string };

The trajectory field follows the ATIF format (schema_version: "atif-0.1").

Environment variables

| Variable | Description | |---|---| | ONE_AGENT_EXTENSION_ACP_COMMAND | Override the default ACP server command | | ONE_AGENT_EXTENSION_ACP_ARGS | Space-separated (or JSON array) extra args for the ACP server | | ONE_AGENT_EXTENSION_ACP_MODEL | Override the model ID | | ONE_AGENT_EXTENSION_DEBUG | Set to 1 / true to enable AI SDK devtools middleware | | ONE_AGENT_DEBUG | Alias for the debug flag | | RIA_PROXY_DEBUG | Alias for the debug flag | | DEBUG | Lowest-priority alias for the debug flag |

Related packages

| Package | Role | |---|---| | @one-agent/agent | Main ONE agent — uses this package for nested delegation | | @one-agent/reason | reason() — required bounded judgment interface | | @one-agent/act | act() — optional MCP tool execution interface | | @one-agent/ria-proxy | Re in Act plugin for OpenAI-compatible runtimes |

Specification

License

Apache-2.0 — see LICENSE and NOTICE at the repository root.