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

@aidalinfo/oc-internal-schedule

v0.1.0

Published

OpenCode plugin that schedules self-messages back into the current session.

Readme

oc-internal-schedule

OpenCode plugin that adds real scheduling tools capable of sending deferred prompts back into an existing session via POST /session/:sessionID/prompt_async.

What it does

  • stores scheduled jobs in a local JSON file
  • supports one-shot jobs and recurring jobs
  • dispatches prompts to an existing OpenCode session
  • exposes actual OpenCode tools usable by an agent

Added tools

  • schedule_self_message
  • list_scheduled_self_messages
  • cancel_scheduled_self_message

These tools automatically use the current OpenCode sessionID.

Install into OpenCode

OpenCode can load the plugin directly from npm by package name.

Example opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@aidalinfo/oc-internal-schedule"]
}

Restart OpenCode after updating the config.

Verify that OpenCode now exposes:

  • plugin tools:
    • schedule_self_message
    • list_scheduled_self_messages
    • cancel_scheduled_self_message

The plugin also injects native usage guidance into the agent prompt, so the agent can often learn to use the tools even without the optional skill.

Skill (Optional)

The companion skill is optional. The plugin already teaches the agent the core usage rules through native plugin hooks.

Use the skill only if you want extra examples and more explicit teaching material.

The companion skill teaches the agent:

  • when a delayed self-reminder is useful
  • when a recurring reminder is better than a one-shot reminder
  • when to list existing reminders before creating a new one
  • how to cancel an obsolete reminder

Skill name:

  • oc-internal-schedule

Skill setup details are documented in:

  • skill/README.md

Test Prompts

Quick access check

Vérifie si tu as accès aux tools `list_scheduled_self_messages`, `schedule_self_message` et `cancel_scheduled_self_message`, puis utilise `list_scheduled_self_messages`.

Skill loading check

Charge le skill `oc-internal-schedule` puis explique quand tu utiliserais `schedule_self_message` plutôt qu'un simple rappel textuel.

One-shot reminder test

Charge le skill `oc-internal-schedule`, puis utilise `schedule_self_message` pour te rappeler dans 2 minutes de relire les logs du run courant et m'en faire un retour ici.

Recurring reminder test

Charge le skill `oc-internal-schedule`, puis utilise `schedule_self_message` pour te rappeler toutes les 10 minutes de vérifier l'état du scheduler et me résumer la situation.

Cancel test

Utilise `list_scheduled_self_messages` pour trouver le dernier rappel planifié dans cette session, puis annule-le avec `cancel_scheduled_self_message`.

Minimal direct prompt

Utilise le tool `schedule_self_message` pour te rappeler dans 2 minutes de relire les logs du run courant et m'en faire un retour ici.

Persistence model

  • jobs are stored in ~/.local/share/opencode/internal-schedule/jobs.json
  • if OpenCode stays running, timers fire at the planned time
  • if OpenCode restarts, jobs are reloaded and re-armed on plugin init

Current limitation:

  • if OpenCode is completely stopped at the scheduled time, the message cannot be injected until OpenCode is started again and the plugin reloads

Why this matters

OpenCode already exposes the key primitives needed for a real internal reminder tool:

  • POST /session/:sessionID/message
  • POST /session/:sessionID/prompt_async

This prototype proves the missing layer:

  • schedule something for a session
  • wake up later
  • inject a prompt back into that same session

CLI

Schedule a one-shot message 5 minutes from now:

node src/cli.js schedule \
  --api-base-url http://127.0.0.1:4096 \
  --session session_123 \
  --in 5m \
  --message "Check the scheduler logs and summarize what happened."

Run due jobs once:

node src/cli.js run-due --api-base-url http://127.0.0.1:4096

Start a polling worker:

node src/cli.js daemon --api-base-url http://127.0.0.1:4096 --poll-ms 5000

List jobs:

node src/cli.js list

Cancel a job:

node src/cli.js cancel --id job_abc123

Tool behavior

schedule_self_message accepts:

  • message
  • in or at
  • optional every
  • optional agent
  • optional variant
  • optional system
  • optional noReply

Default behavior:

  • noReply defaults to false
  • scheduled reminders should therefore generate a normal visible assistant reply in the session
  • visible reminders now use the normal session.prompt route instead of prompt_async
  • set noReply: true only if you want a silent/internal reminder without visible reply

Examples:

Planifie un self-message dans 1 minutes avec `schedule_self_message` pour vérifier mes conteneurs qui tourne stp.
Planifie un rappel toutes les 10 minutes avec `schedule_self_message` pour surveiller l'état du scheduler.

Tests

Run:

npm test

The tests cover:

  • the standalone scheduler prototype against a mock HTTP server
  • the real OpenCode plugin tool flow with a mocked OpenCode client

npm Publishing

This package is intended to be published as:

  • @aidalinfo/oc-internal-schedule

The repository includes a GitHub Actions workflow that publishes to npm using the NPM_TOKEN secret.