@agentsky/desktop-ui

中文文档
0.4.208发布于 2026/11/08SEE LICENSE IN LICENSECommonJS零依赖近 30 天下载 1.9万

The AgentSky for Mac interface, prebuilt: the pages the app's windows show, served by the app's shell from this package's dist/.

原始使用文档
文档目录4 节
  1. Layout
  2. Building
  3. The web's files
  4. Publishing

@agentsky/desktop-ui

The interface of AgentSky for Mac: the pages the app's windows show, built into dist/ and served to them by the app's shell. The shell is the Electron side of the app, in the directory above this one; the two meet at the bridge described in docs/shell-contract.md, and this package names the contract version it was built for in package.json (agentsky.shellContract).

This package is proprietary (see LICENSE). Its sources are not published: npm publish ships index.js, dist/, the license and this file.

Layout

src/                 the pages (index.html, quick-ask.html, browser-bar.html),
                     their modules (*.mjs) and styles/
src/assets/          pictures the pages name by path (web/ and makers/ are
                     generated copies of the web's)
src/editors/         the artifact editors, bundled from the web by editors/
scripts/build.js     builds dist/
scripts/sync-web-*   regenerate the web-derived files (tokens, icons, logos, Arena)
editors/             the editors bundle's own build and dependencies
test/                node --test suites for the modules and the generated files
dist/                the build output: one script and one stylesheet per page,
                     the pages rewritten to load them, chunks/ (what the main
                     window imports on demand), assets/, editors/ and
                     vendor/mermaid.js

Building

npm run build        # dist/, minified, as the app ships it
npm run watch        # rebuild on every change, readable, with source maps
npm test

Run these here or from the shell's directory with --workspace ui; the shell's npm start, pack, dist and test build this package first. In this repository the shell depends on the package as the ui npm workspace, so npm install in the shell's directory installs this package's dependencies too and links it into node_modules/@agentsky/desktop-ui.

The pages are ES modules with htm over Preact; marked, dompurify and katex are imported and bundled. Mermaid is too large and too dynamic to bundle, so the build copies its prebuilt file to dist/vendor/mermaid.js and the page loads it as a plain script when the first diagram draws. The artifact editors are a bundle of their own (src/editors/, built by editors/build.js from the web app's sources) that the page imports when an editor opens; the build copies it as it is. The main window's bundle is split: what it imports with import() (the PDF reader's pdf.js) is a chunk under dist/chunks/ fetched when first needed, so a launch parses only what the first screen runs.

Everything a page references at run time must end up under dist/: the shell serves that directory and nothing else, under a content security policy that allows no network connection. A page's <link rel="stylesheet"> lines are bundled into one stylesheet in that order; each page has exactly one <script type="module">, bundled into one script. The build reads these from the page's markup, so adding a stylesheet means adding its <link>.

The web's files

Colours, icons, logos and the Arena's lineup come from the web app in this repository (ts/): npm run sync:web regenerates src/styles/web-tokens.css, src/web-accents.mjs, src/web-icons.mjs, src/web-logos.mjs and src/assets/web/, and src/web-arena.mjs. The outputs are committed so the package builds without ts/; npm test fails when one is stale and skips those checks when ts/ is absent. Change a colour or a logo on the web, never in the generated files. The editors bundle and the Market's maker marks are regenerated with cd editors && npm install && npm run build and node makers.js there.

Publishing

The interface has its own version; the shell pins that exact version. This lets the bundle advance without reissuing an already signed app version. To publish: npm run build, then npm publish from this directory (the files list keeps the sources out). The shell then pins the published version instead of the workspace; see the shell's README.

版本与发布记录

@agentsky/desktop-ui 共发布 139 个版本,首次发布于 2026/10/21;过去 12 个月发布了 139 个版本。

版本发布日期距今
0.4.208latest2026/11/08今天
0.4.2072026/11/07今天
0.4.2052026/11/07今天
0.4.2042026/11/07今天
0.4.2032026/11/07今天
0.4.2022026/11/07今天

其他发布通道:qa → 0.4.70-qa.3119.1。

关于 @agentsky/desktop-ui 的常见问题

@agentsky/desktop-ui 是什么?

The AgentSky for Mac interface, prebuilt: the pages the app's windows show, served by the app's shell from this package's dist/.

如何安装 @agentsky/desktop-ui?

在项目目录运行 npm install @agentsky/desktop-ui,或使用 pnpm add / yarn add / bun add。

@agentsky/desktop-ui 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/agentsky__desktop-ui 是否存在。

@agentsky/desktop-ui 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@agentsky/desktop-ui 可以商用吗?

@agentsky/desktop-ui 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@agentsky/desktop-ui 的下载量有多少?

根据 npm 官方下载统计,@agentsky/desktop-ui 在 2026/10/05 – 2026/11/03 这 30 天内被下载 19,328 次,日均约 644 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@agentsky/desktop-ui 还在维护吗?

最新版本 0.4.208 发布于 2026/11/08(今天);至今共发布 139 个版本,其中过去 12 个月发布了 139 个;首次发布于 2026/10/21。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。