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

@conversed/core

v0.0.1

Published

Core AST, Parser Engine, and Action Protocol for conversed rich AI chat UI

Readme

@conversed/core

Parser, AST, theming tokens, and Action Protocol for conversed. Framework-agnostic, zero runtime dependencies.

Live playground: conversed-web.web.app

Install

pnpm add @conversed/core

Parse

parseMessageBlocks(rawHtml, { debug? }) turns an HTML/Markdown reply into a ConversedContentBlock[] AST that the framework packages render.

import { parseMessageBlocks } from '@conversed/core';

const blocks = parseMessageBlocks(rawAiText);   // { debug: true } logs the pipeline

Block types: paragraph, heading, list, table, code, stats, progress, callout, chart, followups, divider, details, steps, timeline, media, custom.

Stream

consumeConversedStream(stream, onBlockUpdate?) adapts a token stream (Genkit, OpenAI, Anthropic, Web ReadableStream) into incremental updates, yielding { rawText, blocks }.

Charts

Core never imports Chart.js — toChartJsConfig(block, { primaryColor? }) returns a plain config object; the framework packages render it. CHART_SERIES_COLORS is the default series palette.

Actions

ActionTriggerType = 'navigate' | 'custom-command' | 'prompt-submit' | 'copy-code' | 'external-url'; AgentActionEvent / AgentActionPayload are the event/payload models.

Theming

generateCssVariables(theme?) emits --conversed-* declarations; CONVERSED_GRAY is the iOS gray ramp (50900). Defaults: primary #0071e3, border #e5e5ea, radius 8px.

LLM prompt

Before conversed can parse a reply, the model has to emit conversed content. Append the instruction to your system prompt — CONVERSED_SYSTEM_PROMPT is the raw spec, and getSystemPromptInstruction(options?) returns it optionally extended with the custom actions the model is allowed to trigger:

import { getSystemPromptInstruction } from '@conversed/core';

const systemPrompt = `You are an AI assistant.
${getSystemPromptInstruction({
  allowedActions: [
    { actionId: 'view-detail', description: 'Deep link to item detail', exampleParams: { id: '123' } }
  ]
})}`;

allowedActions is optional — omit it (or call getSystemPromptInstruction()) for the base spec. Each entry becomes a documented data-action-id the model may attach to tables, stats, or buttons, which surface back to you via onAction / (action) in the framework packages.

Docs

github.com/mayeedwin/conversed — full architecture, prompt, and theming guides.

License

MIT © Maye Edwin