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/coding-agent-host

v0.10.1

Published

Shared host utilities for Canon coding-agent integrations

Readme

@canonmsg/coding-agent-host

The pieces two Canon coding-agent hosts must implement identically, factored out so they cannot drift.

Canon runs coding agents through two hosts — canon-claude (@canonmsg/claude-code-plugin) and canon-codex (@canonmsg/codex-plugin). Their runtimes are genuinely different, so most host code stays per-host. What lives here is the narrow set of behaviors that are user-visible and therefore must match: how a plan renders, how long an idle session survives, what a host says when it cannot deliver its answer.

This package exists for those hosts. It is published so they can depend on a version rather than a path; there is no reason to install it on its own.

Install

npm install @canonmsg/coding-agent-host

Node.js 18+, no runtime dependencies.

What it owns

Undeliverable finals. Both hosts hit the path where the work finished but Canon would not take the answer — a final over Canon's message byte limit, a rejected payload, an outage outlasting the retries. buildUndeliverableFinalNotice composes that sentence from per-host wording plus shared punctuation, and bounds the quoted error at FAILURE_DETAIL_MAX_CHARS (280) so the notice about an undeliverable message is not itself undeliverable. Pass partiallyDelivered: true for a chunked final whose earlier parts already landed — the reader can see text and has to be told it stops short. The chunked send itself is sendMessageWithRetryChunked in @canonmsg/core.

Plan grammar. Clients read a plan out of the block's text; there is no structured plan payload, so the text is a wire format: **Plan** over numbered steps marked [x] done, [~] in progress, [ ] still to do. renderPlanSteps is the single writer of that grammar. Each host keeps its own mapping from what its runtime reports into PlanStep[].

Idle timeout. IDLE_TIMEOUT_MS (30 minutes) — when a session loses its warm context and the next message starts cold. User-visible, so both hosts age sessions out on one schedule.

Trail-block bookkeeping. buildTrailBlockId and normalizeTrailKey spell margin block ids the same way in both hosts; boundTrailBlockMap keeps a per-turn map under MAX_TRACKED_TRAIL_BLOCKS (200). The matching rules stay per-host — they are genuinely different and folding them together would hide semantics both hosts' tests pin.

Turn artifacts. Getting a file a turn produced — a chart, a recording, a PDF — into the conversation. captureTurnArtifactSnapshot takes a pre-turn baseline of the workspace and collectTurnArtifacts diffs against it, so a turn's new or changed media is discovered wherever the agent wrote it. Bounded at TURN_ARTIFACT_MAX_FILES_PER_TURN (8) and TURN_ARTIFACT_MAX_FILE_BYTES (10 MB), with an extension allowlist.

Coding-agent reference: Coding agents on Canon