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

@maicolextic/bg-subagents-opencode

v0.1.4

Published

OpenCode plugin adapter for bg-subagents: registers task_bg, intercepts task, steers via chat.params, delivers completion via Bus + chat.message fallback.

Readme

@maicolextic/bg-subagents-opencode

OpenCode plugin adapter for bg-subagents. Intercepts every task call, prompts a picker (background vs foreground), and forks background tasks via the new task_bg tool — without blocking your main conversation.

Audience: OpenCode end-users who want background subagent execution.

Install

pnpm add @maicolextic/bg-subagents-opencode

Wire into ~/.config/opencode/config.json:

{
  "plugins": [
    "@maicolextic/bg-subagents-opencode"
  ]
}

That's it. The plugin auto-registers on session start.

How it works

When OpenCode is about to call task for a subagent:

  1. The tool.execute.before hook fires.
  2. Policy is resolved for that agent name/type.
  3. If mode is foreground → pass through unchanged.
  4. If mode is background or ask → the picker appears:
    Run "subagent:researcher" in:
    > background
      foreground
    [2s timeout → foreground]
  5. Background selection swaps the call to task_bg, which returns { task_id, status: "running" } immediately.
  6. Completion is delivered via a bus event (bg-subagents/task-complete) or, after a 2000 ms ack-timeout, via a synthetic assistant message.

/task command reference

Subcommands

| Command | Description | |---------|-------------| | /task list | List all tasks (active + history). | | /task show <id> | Full detail for a task. | | /task kill <id> | Abort a running task. | | /task logs <id> | Stream JSONL log lines. |

Flags

| Flag | Applies to | Description | |------|-----------|-------------| | --status=<value> | list | Filter by status (running, completed, killed, error, …). | | --agent=<name> | list | Substring match on spawning-agent name. | | --since=<value> | list | Tasks started after an ISO-8601 date or duration (1h, 30m, 7d). | | --tail=<N> | logs | Last N lines only. | | --no-color | all | Suppress ANSI colors. |

Policy

Create ~/.config/bg-subagents/policy.jsonc to customize the picker default:

{
  "$schema": "https://maicololiveras.github.io/bg-subagents/schema/policy-v1.json",
  "default_mode_by_agent_name": { "researcher": "background" },
  "default_mode_by_agent_type": { "subagent": "ask" },
  "timeout_ms": 3000
}

See docs/policy-schema.md for every field.

Full documentation

The root README covers installation, quickstart, the full /task reference, policy sample, troubleshooting, and roadmap.

For the unified skill doc (OpenCode + Claude Code + MCP sections), see docs/skills/bg-subagents/SKILL.md.

License

MIT.