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

@sharpee/channel-service

v3.0.0

Published

Channel-service platform — universal channel-I/O wire producer (ADR-163)

Readme

@sharpee/channel-service

Universal channel-I/O wire producer for Sharpee surfaces (ADR-163).

Installation

npm install @sharpee/channel-service

Overview

  • Channels are the universal UI surface (ADR-163) - channels carry all story-to-UI signals (text, status, media, layout) over a single packet stream; transport sits under channels.
  • ChannelService - the in-process producer. It walks an IChannelRegistry, invokes each channel's produce, and emits wire packets. It runs wherever the engine runs (Node CLI, multi-user server, browser).
  • Capability-filtered manifest - buildManifest() returns a CmgtPacket tailored to the client's ClientCapabilities; build(...) returns a per-turn TurnPacket.
  • Wire decoder - createDecoder / Decoder enforce bootstrap ordering on the consuming side.
  • Consumer-side renderer (ADR-165) - Renderer / createRenderer route decoded packets to per-channel renderers.
  • Domain-agnostic - standard channel definitions (main, prompt, score, etc.) live in @sharpee/stdlib; channel and wire types are re-exported from @sharpee/if-domain, their canonical home.

Usage

import {
  ChannelService,
  createDecoder,
  createRenderer,
  renderToString,
  flattenContent,
  type IChannelRegistry,
  type ClientCapabilities,
  type TurnPacket,
} from '@sharpee/channel-service';

// Producer side (runs with the engine)
const service = new ChannelService(registry, capabilities);
const manifest = service.buildManifest();              // CmgtPacket
const packet: TurnPacket = service.build({ world, events, blocks, turn });

// Consumer side — decode, then render to channel surfaces
const decoder = createDecoder();
const decoded = decoder.decode(packet);
const renderer = createRenderer({ /* channel renderers */ });
renderer.apply(decoded);

// CLI / tooling — project an ITextBlock[] to a single string
const text = renderToString(blocks);

Key Exports

| Export | Side | Description | |--------|------|-------------| | ChannelService, PROTOCOL_VERSION | producer | Builds the manifest and per-turn packets | | createDecoder, Decoder, DecoderState | consumer | Decodes the wire stream with bootstrap-order enforcement | | Renderer, createRenderer, createJsonTreeFallbackFactory | consumer | Routes packets to per-channel renderers (ADR-165) | | renderToString, renderStatusLine | tooling | Single-string projection of an ITextBlock[] | | flattenContent | shared | Projects TextContent arrays to plain strings | | IOChannel, IChannelRegistry, ClientCapabilities, TurnPacket, CmgtPacket, HelloPacket, CommandPacket, WirePacket | types | Channel and wire contracts (re-exported from @sharpee/if-domain) |

Related Packages

License

MIT