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

@lexjade-ai/dsh-api-workspace-controller

v0.1.2-alpha.1

Published

Workspace Remote commands and reconnect-safe state transport

Readme


description: "Host 与 Client 工作区控制:修改工作区导航并跟随其完整投影。" kind: "package-reference"

Workspace Controller

English | 中文

概述

@lexjade-ai/dsh-api-workspace-controller 拥有 Host 的 ctx.workspaceController 服务和生成的 Client ctx.remote.workspace namespace。它的 Remote 方法负责创建、重命名、移除和重排 Workspace,在 Workspace 内重排 Session,从 Workspace 导航中归档 Session,以及跟随完整的 Workspace 投影。当 Client 必须修改或跟随 Workspace 导航时,请通过 API Gateway 使用它。本包同时拥有 ctx.directoryPickerController 与生成的 ctx.remote.directoryPicker namespace,因为它承载的选目录 seam 是抽象的,自身从不作为 Loader entry。

目录


使用本包

Host 控制器会串行执行正确性取决于当前 registry 状态的变更,并为预期失败返回稳定的 WorkspaceError 值。它的 follow() 流会同步订阅持久 Workspace 变更,先发出一份完整 baseline,再按顺序发出 upsertremoveorderarchived 增量。重连会以替换 baseline 开始新一代,因此消费方不依赖收到断线期间的每个增量。

Client 入口提供 ClientWorkspaceModelcreateWorkspaceStateStream()。该模型拥有 Workspace 行、registry 顺序、已归档 Session id、一元变更回声,以及流与一元调用的竞态处理。较新的 Host 行按 updatedAt 获胜;已提交的流顺序优先于较旧的一元响应;已经移除的 Workspace id 不会被延迟数据复活。该包公开与框架无关的快照和订阅,把导航策略与 React hook 留给 UI owner。


模型体验

无,因为 Workspace 组织属于浏览器与 Host 控制状态,并且不注册提示词、工具或会话事件。

KV Cache 影响

无直接影响;Workspace 变更不会改变模型请求。

已知限制与延期工作

  • follow() 在重连后替换完整投影,不提供持久 cursor 或增量追赶协议。
  • 进程本地删除标记只会在 Client 模型生命周期内阻止延迟数据复活已移除的 Workspace。

开发备注

无。