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

pi-scheduler-ext

v0.4.0

Published

Extension pi-coding-agent para pi-scheduler-core

Readme

pi-scheduler-ext

v0.3.5 — Extension pi-coding-agent para pi-scheduler-core.

Integrates pi-scheduler-core into the pi-coding-agent runtime. Registers 15 AgentTools, one slash command, lifecycle event handlers, and a ready-made subagent executor that delegates automations to the claude CLI.

Install

npm install pi-scheduler-ext

Peer dependencies (provided by the pi runtime):

  • @earendil-works/pi-agent-core ^0.74.0
  • @earendil-works/pi-coding-agent ^0.74.0

Usage

import schedulerExtension from 'pi-scheduler-ext';

export default schedulerExtension;

On session_start the extension:

  • Creates a Scheduler scoped to {session.cwd}/.pi/scheduler/
  • Loads custom templates from {session.cwd}/.pi/agent/skills/scheduler-templates/SKILL.md
  • Sets allowed dirs to [session.cwd, ~/repos]
  • Starts the tick loop (30 s interval)
  • Shows a UI notification if there are pending notifications from a previous session

On session_shutdown it stops the scheduler and flushes state to disk.

AgentTools (15)

| Tool | Description | |---|---| | create_automation | Create a recurring shell/script automation | | create_subagent_automation | Create a recurring automation backed by an LLM subagent or chain | | list_automations | List all automations with next-run time and last status | | delete_automation | Delete an automation by ID | | get_automation_logs | Get execution logs for an automation | | list_templates | List available built-in and custom templates | | instantiate_template | Create an automation from a template | | run_task | Run a one-shot task immediately | | get_task_status | Get status and output of a one-shot task | | list_tasks | List all one-shot tasks | | delete_task | Delete a one-shot task | | check_notifications | Get unacknowledged notifications | | ack_notifications | Acknowledge all notifications up to a timestamp | | get_pending_summary | Get count of pending notifications per automation | | set_webhook | Configure a webhook URL for automation results |

Slash command

/scheduler list          — list automations (name, interval, next run, last status)
/scheduler tasks         — list one-shot tasks
/scheduler logs <id>     — last 10 execution logs for an automation
/scheduler templates     — list available templates
/scheduler notifications — pending notification count per automation
/scheduler ack           — acknowledge all pending notifications
/scheduler delete <id>   — delete an automation or task

Subagent automations

create_subagent_automation schedules a recurring automation that delegates to a Claude subagent instead of running a shell command:

// Single agent
create_subagent_automation({
  name: 'Nightly code review',
  intervalMinutes: 1440,
  cwd: 'D:/repos/myproject',
  agent: 'reviewer',
  task: 'Review all uncommitted changes and summarize risks.',
})

// Chain: each step receives the previous step's output as context
create_subagent_automation({
  name: 'Scout and review',
  intervalMinutes: 10080,
  cwd: 'D:/repos/myproject',
  chain: [
    { agent: 'scout',    task: 'Map the codebase structure and entry points.' },
    { agent: 'reviewer', task: 'Review the architecture described above.' },
  ],
})

Built-in agent roles:

| Role | Focus | |---|---| | scout | Codebase reconnaissance | | researcher | Topic investigation with actionable findings | | planner | Step-by-step implementation plans | | worker | Implementation following existing conventions | | reviewer | Code review for correctness, security, and maintainability | | oracle | Independent critical assessment and blind-spot detection | | context-builder | Structured documentation for future agent consumption |

Custom agents can be defined in ~/.pi/agent/agents/<name>.json:

{ "systemPrompt": "You are a security auditor. Focus on OWASP top-10 vulnerabilities." }

Note: claude CLI must be available in PATH (npm install -g @anthropic-ai/claude-code). If it is not found, the executor returns exitCode: -1 with an actionable install hint in stderr.

SQLite storage adapter

Use SQLite instead of JSON files for automation/task persistence:

import { SqliteStorageAdapter } from 'pi-scheduler-ext';
import { Scheduler } from 'pi-scheduler-core';

const scheduler = Scheduler.create({
  dataDir: '~/.pi/scheduler',
  storageAdapter: new SqliteStorageAdapter('~/.pi/scheduler/scheduler.db'),
});

Requires better-sqlite3 (included as a dependency of pi-scheduler-ext).

Custom templates via SKILL.md

Place a SKILL.md file at {session.cwd}/.pi/agent/skills/scheduler-templates/SKILL.md. Each ## heading defines a template:

## my-build
- **Command**: `dotnet build`
- **Interval**: 30 min
- **Params**: outputPath

Templates are loaded automatically at session start and usable via instantiate_template or list_templates.

License

MIT