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

@alfe.ai/remote-host

v0.0.5

Published

Runtime-agnostic host for the Alfe interactive remote-control relay: the relay/browser/terminal resource graph, browser takeover, and an SDK-free tool catalog any agent runtime can register

Readme

@alfe.ai/remote-host

Runtime-agnostic host for Alfe's interactive remote-control relay. One outbound WebSocket carries browser co-browse (@alfe.ai/browser) and web terminal (@alfe.ai/terminal) sessions. This package owns the resource graph, the human browser-takeover flow, the default-deny SSRF navigation policy, and an SDK-free tool catalog. It has no agent-runtime SDK dependency.

Adapters own activation, config sourcing, and tool registration:

  • @alfe.ai/openclaw-remote (OpenClaw plugin) is the first adapter.
  • Terminal-runtime hosts (claude-code, codex, …): the persistent agent host owns a RemoteHost (via @alfe/agent-host-core's createTerminalRemote) and executes the catalog in async-takeover mode; the alfe-platform MCP server (@alfe.ai/mcp-tools registerRemoteTools) forwards calls to it over a local socket.

Host

import { RemoteHost } from "@alfe.ai/remote-host";
// resolveConfig is the caller's own dependency (e.g. `@alfe.ai/config`); any
// () => ({ apiKey, apiUrl, workspacePath }) works.
import { resolveConfig } from "@alfe.ai/config";

const host = new RemoteHost({ logger, resolveCredentials: resolveConfig });
const result = await host.start({ config, ssrfPolicy, workspaceDir }); // "started" | "idle" | "busy"
// …
await host.stop();

Each RemoteHost owns its own RemoteHostState (or adopts one passed as state). Two instances never share resources. stop() invalidates the generation, stops the relay, closes every session, awaits browser shutdown, and clears the browser re-check timer.

Tool catalog

import { createRemoteToolCatalog, publicErrorMessage } from "@alfe.ai/remote-host";

for (const tool of createRemoteToolCatalog(host)) {
  // tool.name, tool.description, tool.inputSchema (JSON Schema object)
  // tool.execute(args, { conversationId }) → { type: "json", value } | { type: "image", data, mimeType, bytes }
  // On throw, show the model only publicErrorMessage(error).
}
  • conversationId comes from the host's trusted context. Only an adapter whose runtime cannot supply it passes { modelSuppliedConversationId: true }, which adds it to the takeover schema (a context value still wins).
  • execute re-validates every bound at runtime; schemas are advisory to some hosts.
  • Send image output as native image content. Never copy its base64 into JSON.
  • Bound JSON output at the host's own result limit (OpenClaw: 512 KiB).

MCP usage: expose each entry under its catalog name, pass the JSON Schema as the tool's input schema (the low-level Server list handler accepts it directly; McpServer needs an equivalent zod shape), map image output to MCP image content, and return publicErrorMessage(error) with isError: true on failure. Supply conversationId from the session, not the model.

Takeover

Blocking mode (OpenClaw): request_browser_takeover blocks until hand-back or timeout. Async mode (AsyncTakeovers, MCP runtimes): it returns within 45 s and browser_takeover_wait continues; the host keeps the takeover alive and reports an unclaimed hand-back through onSettled. The takeover API's 409 (no shared browser) and 503 (presence unconfirmed) map to the fixed TAKEOVER_NO_BROWSER_MESSAGE / TAKEOVER_PRESENCE_UNAVAILABLE_MESSAGE. The session the call created is always completed.