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

@mlpal/yodex-ui

v0.3.0

Published

React components and a session hook for yodex frontends: transcript, tool calls, permissions, questions, run status, sessions, composer, over the yodex serve wire protocol.

Readme

@mlpal/yodex-ui

React components and a session hook for yodex frontends, over the yodex serve wire protocol (@mlpal/harness-protocol). One engine, many frontends: the workspace UI, the VS Code panel and the serve web page all render the same events with these.

import { useYodexSession, Transcript, Composer, RunStatus, PermissionPrompt, QuestionForm, SessionList } from "@mlpal/yodex-ui";
import "@mlpal/yodex-ui/styles.css";   // utilities, mapped onto your tokens
import "@mlpal/yodex-ui/theme.css";    // the default tokens; skip if your app defines them

function Chat({ url, token }: { url: string; token?: string }) {
  const s = useYodexSession({ url, token, run: { mode: "cruise" } });
  return (
    <div className="flex h-full flex-col">
      <Transcript
        items={s.state.items}
        footer={
          <>
            {s.state.pendingPermissions.map((p) => <PermissionPrompt key={p.id} request={p} onAllow={s.allow} onDeny={s.deny} />)}
            {s.state.pendingQuestion && <QuestionForm request={s.state.pendingQuestion} onSubmit={s.answer} onDecline={(id) => s.answer(id, { declined: true, answers: [] })} />}
            <RunStatus running={s.state.running} startedAt={s.state.runStartedAt} activity={s.state.activity} lastResult={s.state.lastResult} usageTotal={s.state.usageTotal} connection={s.state.connection} onStop={s.stop} onApprove={s.approve} />
          </>
        }
      />
      <Composer onSubmit={(text, attachments) => s.run(text, attachments)} running={s.state.running} onStop={s.stop} />
    </div>
  );
}
  • useYodexSession owns one socket (reconnect with jittered backoff, request-id correlation) and reduces the stream into SessionState: transcript rows, plan, pending permission and question prompts, run status, usage, session and model lists.
  • The reducer and client are framework-free (YodexClient, reduce, applyEvent) for hosts that are not React.
  • Hosts that virtualize the transcript render TranscriptRow per item; ApprovalPrompt shows state.pendingApproval; PermissionPrompt takes onAllowSession (the hook's allowForSession) and opt-in hotkeys for the one prompt that should own a/d; the Composer steers a live run through onSteer (the hook's steer) and takes value/onChange, initialValue, hideAttach, submitOnEnter (defaults to keyboards only).
  • Styling: styles.css carries only utilities (no preflight, no Tailwind theme on :root), compiled against the Obsidian Intelligence token names (--background, --primary, --muted, --success, --warning, --info, …). Every component works at 390 px width with 44 px touch targets.
  • state.capabilities mirrors ready.capabilities ("questions", "approval", "attachments", "sessions_v2", …): the hook refuses attachments the server cannot take, QuestionForm and the approval controls only ever show when the server asks, and a yodex/1 server still works.