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

xgen-dex-protocol

v1.57.2

Published

XGEN 서버와 말하는 법 — 순수 TypeScript, 의존 0

Readme

xgen-dex-protocol

npm i xgen-dex-protocol

모노레포(PlateerLab/xgen-dex-core) 안에서는 @dex/protocol 이라는 별칭으로 쓴다. 같은 코드이고, 밖으로 나갈 때만 이 이름이다 — npm 에 @xgen 스코프 권한이 없어 기존 xgen-dex-cli 와 같은 무스코프 규약을 따른다.

XGEN 서버와 말하는 법. 의존 0 — 브라우저에서도, Electron 렌더러에서도, Node 에서도, 터미널에서도 같은 코드가 돈다.

여기 있는 것과 없는 것의 기준은 하나다: 서버와 주고받는 것인가.

  • 있다 — HTTP 클라이언트, 인증·토큰 회전, SSE 파싱, 채팅/이력/에이전트/SSH/Teams/ 음성/알림의 요청·응답 타입, 그리고 그 응답을 다루는 순수 함수 (stripBrowserContext, toHistoryAttachments 처럼 서버 응답의 형태를 아는 것). 도구 과정 표시 규칙(tool-activity: collapseToolSteps · pairToolCalls · countToolCalls)도 여기다 — 도구 이벤트의 모양을 알고, 앱과 웹이 같은 건수를 말해야 한다.
  • 없다 — 파일을 읽거나, 프로세스를 띄우거나, 창을 열거나, 디스크에 무언가를 쓰는 것. 그건 @dex/engine 이나 앱의 일이다.

앱이 전부를 쓰지 않아도 된다

CLI 는 Teams 와 음성을 부르지 않는다. 그래도 타입과 클라이언트는 여기 남는다 — 나중에 켜는 것이 앱의 한 줄이 되도록.

XgenClient 는 필요한 것만 붙일 수 있다:

const client = new XgenClient({ baseUrl, surface: 'cli' });
client.chat;    // 언제나
client.ssh;     // 언제나
client.teams;   // surface: 'desktop' 일 때만 — 아니면 접근 시 명확히 거절