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

@wujie-shell/sdk

v1.1.2

Published

`@wujie-shell/sdk` contains the renderer-facing TypeScript types and small helpers for product UI projects that consume `wujie-shell`.

Readme

@wujie-shell/sdk

@wujie-shell/sdk contains the renderer-facing TypeScript types and small helpers for product UI projects that consume wujie-shell.

The runtime object is injected as window.wujieShell: Electron uses preload and the local Web Host uses a page bootstrap. UI code imports the same public entry and Hooks in both environments.

Responsibility

  • Define the public renderer API shape.
  • Define common event/status types.
  • Provide helpers for shell payloads.
  • Keep UI code independent from Electron internals.
  • Keep Electron and Web implementations in separate source directories while exposing one host-neutral Hook surface.

This package must stay product-agnostic. Product-specific Agent, Skill, Plugin, and Workflow behavior belongs in apps/<product>.

Exported Types

import type {
  ChatStreamEvent,
  GatewayStatus,
  ShellMediaItem,
  ShellResult,
  Unsubscribe,
  WindowWujieShell,
} from '@wujie-shell/sdk'

Exported Helpers

import { extractShellMedia } from '@wujie-shell/sdk'

extractShellMedia(payload) reads OpenClaw payloads shaped like:

{
  showInUI: true,
  paths: Array<{
    uri: string
    mimeType: string
    id?: string
    name?: string
    size?: number
    fileKind?: string
    metadata?: Record<string, unknown>
    persistToGeneratedFiles?: boolean
  }>
}

and returns a normalized ShellMediaItem[]. Shell Core also uses these generic descriptors when projecting newly indexed session artifacts into generated-files; producer metadata remains opaque.

Runtime Access

Use the global injected object:

const shell = window.wujieShell
const status = await shell.openclaw.gatewayStatus()

Renderer code should not import ipcRenderer or use Electron APIs directly.

Desktop shell abilities are also consumed through the same global object:

await shell.window.openDevTools()

const off = shell.window.onDevToolsShortcut(event => {
  console.log(event.accelerator)
})

Model provider settings can be read and written through the injected shell API:

await shell.models.setSettings({
  provider: 'wujieai',
  apiKey: '...',
  modelName: 'auto',
  modelBaseUrl: 'https://model.example.com',
})

UI Framework Boundary

@wujie-shell/sdk keeps the base entry framework-agnostic. React products can import the optional subpath @wujie-shell/sdk/react, which wraps the injected window.wujieShell object for gateway status, sessions, chat history, chat streaming, and ask-user-question events.

import { useGatewayStatus, useSessions } from '@wujie-shell/sdk/react'

Use useWujieShell() when direct access is needed. It works in Electron and Web because the active host installs the same facade contract before renderer code runs. Product UI must not select @wujie-shell/sdk/electron or @wujie-shell/sdk/web itself.

Product-specific UI, routing, assets, Agent/Skill/Plugin behavior, and message rendering still belong in product workspaces such as apps/desktop-cn/src. SDK hooks must stay product-agnostic and must not import product components.

API Groups

  • window.wujieShell.app
  • window.wujieShell.window
  • window.wujieShell.openclaw
  • window.wujieShell.terminal
  • window.wujieShell.agents
  • window.wujieShell.files
  • window.wujieShell.workspace
  • window.wujieShell.skills
  • window.wujieShell.sessions
  • window.wujieShell.cron
  • window.wujieShell.models
  • window.wujieShell.config
  • window.wujieShell.chat

See ../../docs/wujie-shell-sdk-api.md for the detailed API manual.