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

@opencomputer/flue

v0.3.0

Published

Run a Flue app as an OpenComputer agent with managed models, repository tools, and demand-driven sandboxes.

Downloads

595

Readme

@opencomputer/flue

Run a stock Flue app as an OpenComputer agent. Your compiled app is the runtime; OpenComputer connects it to managed sessions, model access, and optional sandboxes. This package supplies the OpenComputer-specific wiring the app opts into. Deployments use Flue's stock flue build --target cloudflare output, with one Durable Object per session.

What it gives you

  • useOcGateway(ctx) + DEFAULT_MODEL: point the managed anthropic provider at the OpenComputer model gateway. Call it inside your defineAgent initializer.
  • route — the HTTP-transport opt-in every OC-hosted agent must export (export { route }).
  • ocSandbox(env) — optional, demand-driven Linux shell/files. Declaring it makes no network request; the first actual sandbox operation resolves the persistent session sandbox.
  • ocRepoTools(ctx) — managed repository discovery, exact-SHA checkout into the session sandbox, and OpenComputer-authored GitHub pull requests.
  • @opencomputer/flue/app — a default hosting app (flue() routes + /health + telemetry). Or import '@opencomputer/flue/wire' from your own app.ts for telemetry only.

Minimal agent

import { defineAgent, defineAgentProfile } from "@flue/runtime";
import { useOcGateway, route, DEFAULT_MODEL } from "@opencomputer/flue";

export { route };

export default defineAgent((ctx) => {
  useOcGateway(ctx);
  return {
    profile: defineAgentProfile({ instructions: "You help customers." }),
    model: DEFAULT_MODEL, // prompt-caching-safe
  };
});

src/app.ts:

export { default } from "@opencomputer/flue/app";

Then flue build --target cloudflare and oc agent deploy. See oc-flue-starter for a full example.

Repository work

Give a hosted agent the standard repository tools beside its sandbox:

import { defineAgent, defineAgentProfile } from "@flue/runtime";
import {
  DEFAULT_MODEL,
  ocRepoTools,
  ocSandbox,
  route,
  useOcGateway,
} from "@opencomputer/flue";

export { route };

export default defineAgent((ctx) => {
  useOcGateway(ctx);
  return {
    profile: defineAgentProfile({
      instructions:
        "List working repositories, resolve an exact owner/repository, add it, edit and test only in the returned source path, then open a pull request.",
    }),
    model: DEFAULT_MODEL,
    sandbox: ocSandbox(ctx.env),
    tools: ocRepoTools(ctx),
  };
});

list_working_repos returns only repositories allowed by the agent's current OpenComputer policy and GitHub App grant. add_source pins the selected ref to an exact commit and returns its /workspace/sources/... path. github_publish_pull_request publishes that source's inspected changes on an oc/... branch. The tools do not default to the deployment repository, expose credentials, or perform fuzzy repository selection. A session supports up to eight sources; reuse an existing source or start a new session after reaching that limit.

Direct text sessions, managed Slack, workflows, and optional demand-driven sandboxes continue to use ordinary Flue behavior.

Environment (set on the tenant script by the OC deploy)

OC_GATEWAY, OC_SESSION_TOKEN, and OC_REPO_API are managed by OpenComputer. Agents that explicitly use ocSandbox use the managed OC_SANDBOX_API. User variables come from agent.toml [vars]; write-only secrets are set with oc agent secret and both take effect on the next deployment. Reserved OC_/FLUE_ prefixes are platform-managed.