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

@canonmsg/local-agents

v0.3.0

Published

Canon local agent lifecycle manager

Downloads

703

Readme

Canon Local Agents

canon-necromance lists and revives local Canon agents across runtime types.

npm install -g @canonmsg/local-agents
canon-necromance
canon-necromance list --json
canon-necromance revive frontend

It reads Canon profiles from ~/.canon/agents.json and non-secret runtime history from ~/.canon/runtimes/. Revived hosts run in the foreground. Keep that terminal open while you want Canon to reach the agent. Closing it, logging out, rebooting, or sleeping long enough to stop the process takes the local agent offline until you revive it.

For the public run guide, see https://canonmail.com/agents/integrations. For coding-host concepts, see https://canonmail.com/agents/coding-agents.

Sessions started only with raw CANON_API_KEY are shown as manual/non-revivable because the manager does not persist secret-bearing environment state.

Revive-on-wake supervisor (opt-in)

When a host process dies — terminal closed, reboot, long sleep — the agent is offline until someone runs canon-necromance again. Canon cannot reach into your laptop, so wake must be local and opt-in. The supervisor is that local wake: nothing is installed or scheduled until you run supervisor install yourself, and supervisor uninstall removes it completely.

It is revive-on-wake only, never a keep-alive daemon. Each run:

  1. Loads the runtime catalog (~/.canon/runtimes/*.json).
  2. For every revivable entry whose recorded process is not alive, resolves the profile's API key from ~/.canon/agents.json (entries without resolvable credentials are skipped with a log line) and makes one GET /conversations call.
  3. Compares each conversation's lastMessage against the entry's stored per-conversation lastInboundMessageId cursors. Pending = an inbound (non-self) lastMessage newer than the cursor.
  4. Only if work is pending (or --always was passed) respawns the recorded launch command detached in the recorded cwd, with output appended under ~/.canon/logs/supervisor/, then exits.

A host you stop that has no waiting messages stays stopped. manual and embedded runtimes are never touched. A lockfile under ~/.canon/run/ guarantees overlapping invocations cannot double-spawn, and profile locks held by live sessions are respected.

canon-necromance supervisor run-once            # one pass, right now
canon-necromance supervisor run-once --always   # revive even without pending work
canon-necromance supervisor status              # lock state, dry-run plan, last run log
canon-necromance supervisor install             # schedule run-once via launchd (macOS)
canon-necromance supervisor uninstall           # unload and remove the LaunchAgent

What supervisor install writes (macOS)

~/Library/LaunchAgents/com.canon.necromance.supervisor.plist, loaded with launchctl load. /path/to/node and /path/to/dist/cli.js are the absolute paths of the Node binary and the installed canon-necromance entry point; PATH is captured from the installing shell so revived launch commands resolve under launchd:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.canon.necromance.supervisor</string>
  <key>ProgramArguments</key>
  <array>
    <string>/path/to/node</string>
    <string>/path/to/dist/cli.js</string>
    <string>supervisor</string>
    <string>run-once</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>StartInterval</key>
  <integer>300</integer>
  <key>EnvironmentVariables</key>
  <dict>
    <key>PATH</key>
    <string>(PATH of the installing shell)</string>
  </dict>
  <key>StandardOutPath</key>
  <string>/Users/you/.canon/logs/supervisor/launchd.log</string>
  <key>StandardErrorPath</key>
  <string>/Users/you/.canon/logs/supervisor/launchd.log</string>
</dict>
</plist>

Remove it with canon-necromance supervisor uninstall, or manually:

launchctl unload ~/Library/LaunchAgents/com.canon.necromance.supervisor.plist
rm ~/Library/LaunchAgents/com.canon.necromance.supervisor.plist

On non-macOS platforms supervisor install prints an equivalent cron line instead of failing.