diff --git a/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.i18n.yaml b/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.i18n.yaml index 945501552c..0cd1f0b744 100644 --- a/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.i18n.yaml +++ b/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.i18n.yaml @@ -36,8 +36,8 @@ en: 4479d41466723100 zh: 3a7f398e0d0070a5 /agent-note-typert-gateway-targeted-method-calls/the-remote-package-entry: - en: 75e977fe0fb71d59 - zh: 00760c79da173cb7 + en: 91033aab32e4d8eb + zh: a11ada70e047af55 /agent-note-typert-gateway-targeted-method-calls/strict-consumer-api-types: en: 983f55c0ed4a8edc zh: 5a736e00e4b57e6a diff --git a/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md b/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md index b11aa25668..383f9ef9fa 100644 --- a/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md +++ b/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.md @@ -232,7 +232,7 @@ import goalsRemote from '@deepseek-ai/dsh-goal/remote' This import brings the `.d.ts` map augmentation into the current TypeScript project while supplying the JS descriptor for the same contract as a value to the runtime. A business package that is not imported does not extend the current project's Remote API types. -The business package's published files must include `lib/typert.remote-client.d.ts.map`. The generated DTS refers to its adjacent map with `//# sourceMappingURL=typert.remote-client.d.ts.map`; the map source points from `lib` to the business source by a relative path such as `../src/index.ts`. The `/remote` export does not list the map separately; the package `files` field publishes it. That target is a development-time path: a workspace consumer resolves it through the package link, so the published payload keeps excluding `src` and a published map simply resolves nothing. +The business package's published files must include `lib/typert.remote-client.d.ts.map`. The generated DTS refers to its adjacent map with `//# sourceMappingURL=typert.remote-client.d.ts.map`; the map source points from `lib` to the business source by a relative path such as `../src/index.ts`. The `/remote` export does not list the map separately; the package `files` field publishes it. That target is a relative path inside the same package, and the payload publishes `src` beside the declaration map, so the navigation resolves for an installed consumer ([rationale](../process/2026-10-08-published-source-and-docs.md)). Code that needs only static types may use `import type {} from '@deepseek-ai/dsh-goal/remote'`. This import is erased at runtime, loads no JS, and cannot trigger runtime registration. An environment that makes real calls must pass the contribution from a normal value import to the Client Remote Service. diff --git a/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.zh.md b/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.zh.md index a287402746..4c8530a314 100644 --- a/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.zh.md +++ b/.agents/notes/implemented/architecture/2026-08-02-typert-remote-method-calls.zh.md @@ -232,7 +232,7 @@ import goalsRemote from '@deepseek-ai/dsh-goal/remote' 该 import 让 `.d.ts` 的 map augmentation 进入当前 TypeScript project,同时把同一约定的 JS descriptor 作为值交给运行时。未 import 的业务包不会扩展当前 project 的 Remote API 类型。 -业务 package 的发布文件必须包含 `lib/typert.remote-client.d.ts.map`。生成 DTS 以 `//# sourceMappingURL=typert.remote-client.d.ts.map` 引用相邻 map;map 中的 source 从 `lib` 相对指向业务源码,例如 `../src/index.ts`。`/remote` export 不单独列出 map,package `files` 负责发布它。该目标是开发期路径:workspace 消费者经 package link 解析它,因此发布产物仍然不含 `src`,已发布的 map 只是解析不到东西。 +业务 package 的发布文件必须包含 `lib/typert.remote-client.d.ts.map`。生成 DTS 以 `//# sourceMappingURL=typert.remote-client.d.ts.map` 引用相邻 map;map 中的 source 从 `lib` 相对指向业务源码,例如 `../src/index.ts`。`/remote` export 不单独列出 map,package `files` 负责发布它。该目标是同一 package 内的相对路径,发布产物在声明映射旁一并发布 `src`,因此已安装的消费方也能完成这次导航([理由](../process/2026-10-08-published-source-and-docs.zh.md))。 仅需要静态类型时可以使用 `import type {} from '@deepseek-ai/dsh-goal/remote'`;这种 import 在运行时会被擦除,不会加载 JS,也不能触发任何运行时注册。需要真实调用的环境必须把普通 value import 得到的 contribution 交给 Client Remote Service。 diff --git a/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.i18n.yaml b/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.i18n.yaml index 531b156371..957d8ff349 100644 --- a/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.i18n.yaml +++ b/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.i18n.yaml @@ -33,8 +33,8 @@ en: d83f6cf38529c5b5 zh: 4df5659b2154d3b7 /agent-note-private-npm-publication-as-three-independent-sequences/decision/release-family-objects: - en: 5bc6a83d124b682d - zh: 17383ec5c3c7e0e5 + en: e0cdaa5aaa1f7d25 + zh: 645f0a0e43a37ddd /agent-note-private-npm-publication-as-three-independent-sequences/decision/workflow-shape-pack-on-pr-push-publish-from-a-manual-dispatch-workflow: en: ea0acc6409da4d5c zh: ac0bd2fe41f4fe67 diff --git a/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.md b/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.md index 8552232363..68b3b067a9 100644 --- a/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.md +++ b/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.md @@ -117,7 +117,7 @@ The entity in this domain is a **release family**: a set of packages sharing one | `publish` | the three registry states above | | `process` / `tarball` | the one home for spawning commands and for reading a packed tarball, including the entry guard that keeps every script importable | -The dsh family applies the repository's publication payload policy, which rejects sources and declaration maps. The vendored family keeps upstream's payload, because those manifests export `./src/*` and dropping `src` would publish an export map pointing at absent files. +The dsh family applies the repository's publication payload policy, which publishes `src`, its declaration maps, and the JavaScript maps beside the bundles they describe ([rationale](2026-10-08-published-source-and-docs.md)). The vendored family keeps upstream's payload, because upstream's manifest owns it and those manifests export `./src/*`. ### Workflow shape: pack on PR/push, publish from a manual dispatch workflow diff --git a/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.zh.md b/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.zh.md index 9d130478e6..d3437eecae 100644 --- a/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.zh.md +++ b/.agents/notes/implemented/process/2026-08-10-npm-release-sequences.zh.md @@ -117,7 +117,7 @@ registry 的两个行为决定了「怎么尝试一次发布」。写入之间 | `publish` | 上面那三态 | | `process` / `tarball` | 启动命令、读取打包 tarball 的唯一正家,其中的入口守卫让每个脚本都可被 import | -dsh 族套用仓库的发布 payload 策略(拒绝源码与声明映射)。vendored 族保留上游 payload,因为那些 manifest 导出 `./src/*`,去掉 `src` 会发出一个导出映射指向不存在文件的包。 +dsh 族套用仓库的发布 payload 策略(发布 `src`、其声明映射,以及紧挨所描述 bundle 的 JavaScript map,[理由](2026-10-08-published-source-and-docs.zh.md))。vendored 族保留上游 payload,因为该 payload 由上游 manifest 拥有,且它们导出 `./src/*`。 ### workflow 形状:PR/push 上 pack,从手动 dispatch 工作流发布 diff --git a/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.i18n.yaml b/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.i18n.yaml new file mode 100644 index 0000000000..ec6ba18f36 --- /dev/null +++ b/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.i18n.yaml @@ -0,0 +1,19 @@ +# Bilingual-pair consistency record for 2026-10-08-published-source-and-docs.md (docs/i18n/README.md): per heading +# section, a hash of its English and Chinese blocks outside code blocks and generated regions. +# After editing either side, bring the other along and re-record with: +# pnpm run verify-translation-pairing --write .agents/notes/implemented/process/2026-10-08-published-source-and-docs.md +/agent-note-published-source-maps-and-documentation: + en: dbec3958b6bb3a8c + zh: f17abeb0533b4191 +/agent-note-published-source-maps-and-documentation/problem: + en: 699d35bd0bb12645 + zh: c9e362c336c6b440 +/agent-note-published-source-maps-and-documentation/decision: + en: 0181de5ab7314873 + zh: 6af13b56cf779d9f +/agent-note-published-source-maps-and-documentation/alternatives-considered: + en: 953acd4b427b6698 + zh: 43426e6213773943 +/agent-note-published-source-maps-and-documentation/consequences: + en: e57d7a2d3b5cbdac + zh: 1f7c314b09643ae6 diff --git a/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.md b/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.md new file mode 100644 index 0000000000..40569c32d5 --- /dev/null +++ b/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.md @@ -0,0 +1,41 @@ +# Agent Note: Published source, maps, and documentation + +Status: implemented + +English | [中文](2026-10-08-published-source-and-docs.zh.md) + +## Problem + +A published `@deepseek-ai/dsh-*` package carried declarations, bundled runtime, and locale resources, but neither the TypeScript the declarations describe nor the maps that resolve into it. Its `exports` map nevertheless declared `./src/*`, so an installed consumer resolved that subpath to files the tarball did not contain. A plugin author who wanted the implementation behind a documented API had to read the declaration, the documentation website, or a checkout at the matching `dsh-v*` tag: the first stops at the declaration, and the other two are not the installed version. The repository's Markdown documentation reached readers only through the website, which tracks the published release. + +## Decision + +Every release member publishes its TypeScript source, the declaration maps that resolve into it, and the JavaScript maps beside the bundles they describe. `@deepseek-ai/dsh` publishes the documentation website's page set plus the upgrade guides, and the build compresses emitted bundles without mangling identifiers. + +[`expectedDshPackageFiles`](../../../../scripts/check-workspace-constraints.ts) lists `lib/types/**/*.d.ts.map`, `lib/**/*.js.map`, and `src`; a package with Typert Remote navigation also lists `lib/typert.remote-client.d.ts.map`, which its generated declaration references through `sourceMappingURL`. No payload member is forbidden, so the static manifest check owns the exact publication list. The `./src/*` export that 315 of the 332 release members declare resolves to those files, which serves editor navigation and reading; plain Node still cannot import them without a TypeScript loader. + +The client preset compresses the browser bundle's text (`minify: { compress: false, mangle: false }`). Identifiers keep their names, so a stack frame and the published map still name the original code. Node-side entries stay uncompressed: the browser worker image lowers `yield*` only as a whole statement and rewrites `for await` loops by their source layout, and compressed input breaks both. + +`@deepseek-ai/dsh` stages that set into `apps/cli/docs` from its `prepack` lifecycle through [`scripts/stage-dsh-docs.ts`](../../../../scripts/stage-dsh-docs.ts), and removes the copy again from `postpack`. The set is the website manifest's Markdown, every `docs/upgrade-guide/` document, and the non-Markdown assets those pages reference. Staging also generates `docs/upgrade-guide/README.md`, an index grouped by the release each `v` directory upgrades from, with each guide's title, its English and Chinese descriptions, and both relative paths; the repository tree keeps no index of its own. The generated `docs/persistence-changes/` records, the `docs/i18n/` guidelines, and the `*.i18n.yaml` consistency records stay out. The vendored family keeps upstream's payload unchanged ([release sequences](2026-08-10-npm-release-sequences.md)). + +Desktop keeps `src/` and the `@deepseek-ai/dsh` `docs/` tree inside `app.asar`, so an agent reads the installed version's documentation and code there; [its runtime file policy](../../../../apps/desktop/scripts/runtime-file-policy.ts) still omits every declaration and map. Ordinary tools cannot open an archive entry, so [`dsh-shell-env`](../../../../packages/shell/shell-env/README.md) gives every model shell call `DSH_INSTALL_DIR`, the `@deepseek-ai/dsh` package directory, and `DSH_NODE_EXECUTABLE`, the executable running the Harness; under Desktop that is Electron, whose Node mode (`ELECTRON_RUN_AS_NODE=1`) reads the archive. The Python single-file executable pays nothing: [`PUBLISHED_PAYLOAD_IGNORES`](../../../../scripts/build-exe-for-python-sdk.ts) excludes the same trees, so its contents do not depend on a staged `docs` left in the checkout. + +## Alternatives considered + +**Keep the payload declarations-only and send readers to the documentation website or the matching `dsh-v*` tag.** Rejected because neither is the installed version, and the website serves the latest published release rather than a prerelease. The declared `./src/*` export also has no meaning without those files. + +**Publish maps without `src`.** Rejected because a map whose `sources` are absent resolves nothing, which is exactly the navigation the [Typert Remote design](../architecture/2026-08-02-typert-remote-method-calls.md) requires. + +**Publish the whole `docs/` tree, or only the website's page set.** Both extremes were rejected. The whole tree publishes maintainer material an installed reader does not need — postmortems, testing guides, agent instructions, and the generated migration records — while the site's page set alone omits the upgrade guides, which are the documents an installed reader consults when a released change breaks something. + +**Mangle the bundles as well.** Rejected because mangled identifiers break the correspondence a published map exists to provide and make an unhandled stack frame unreadable. + +**Compress the node-side entries as well.** Rejected because the browser worker image refuses compressed input: the packer rejects a `yield*` a compressor moved into an expression, and it produces unparseable code for `dsh-agent-instructions`. Both are lowering constraints, not size arguments. + +## Consequences + +`src` adds about 29 MB and declaration maps about 10 MB across the release set; JavaScript maps add about 49 MB, and the staged documentation adds 6.4 MB across 320 files to `@deepseek-ai/dsh`. Compression removes about a third of a browser bundle — `ui-chat`'s `lib/client.js` falls from 591 kB to 420 kB — while node-side entries keep their size until the worker image lowering accepts compressed input. The macOS arm64 `app.asar` grows by about 20 MB of `src` and 5 MB of documentation; the Python executable keeps its previous payload. + +A consumer editor now follows a declaration to the installed implementation, and a plugin author reads that version's documentation without a checkout. The staged copy keeps the repository's relative links, so a link into `../packages/**` or into the omitted `persistence-changes/` records resolves only in a checkout. `docs/` exists in the working tree only between `prepack` and `postpack`, and `pnpm run clean` removes a copy an interrupted pack left behind. + +`pnpm run constraints` rejects a member whose `files` omits `src` or a map, because the canonical list is exact. The release family's tarball check requires `@deepseek-ai/dsh` to carry documentation, the upgrade guide index, and source, so a pack run that skips the staging hook fails instead of publishing without them. diff --git a/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.zh.md b/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.zh.md new file mode 100644 index 0000000000..b51b14a48e --- /dev/null +++ b/.agents/notes/implemented/process/2026-10-08-published-source-and-docs.zh.md @@ -0,0 +1,41 @@ +# Agent Note: 发布源码、映射与文档 + +Status: implemented + +[English](2026-10-08-published-source-and-docs.md) | 中文 + +## Problem + +已发布的 `@deepseek-ai/dsh-*` 包带有声明文件、打包后的运行时和 locale 资源,却没有声明文件所描述的 TypeScript,也没有能解析到它的映射。它的 `exports` 仍然声明了 `./src/*`,于是已安装的消费方把该子路径解析到 tarball 中并不存在的文件。插件作者若想看到某个已记录 API 背后的实现,只能读声明文件、文档网站,或检出匹配的 `dsh-v*` tag:第一种停在声明处,后两者都不是已安装的版本。仓库的 Markdown 文档也只能通过网站到达读者,而网站跟随的是已发布版本。 + +## Decision + +每个发布成员都发布自己的 TypeScript 源码、能解析到该源码的声明映射,以及紧挨所描述 bundle 的 JavaScript map。`@deepseek-ai/dsh` 另发布文档网站的页面集合外加升级指南,构建也会压缩产出的 bundle,但不混淆标识符。 + +[`expectedDshPackageFiles`](../../../../scripts/check-workspace-constraints.ts) 列出 `lib/types/**/*.d.ts.map`、`lib/**/*.js.map` 与 `src`;带 Typert Remote 导航的包还会列出 `lib/typert.remote-client.d.ts.map`,其生成的声明通过 `sourceMappingURL` 引用该映射。没有任何载荷成员被禁止,发布清单由静态 manifest 检查精确持有。332 个发布成员中已有 315 个声明过 `./src/*`,该导出现在解析到这些文件,服务于编辑器导航与阅读;纯 Node 仍需 TypeScript loader 才能 import 它们。 + +client 预设会压缩浏览器 bundle 的文本(`minify: { compress: false, mangle: false }`)。标识符保持原名,因此栈帧与已发布的 map 仍然指向原始代码。Node 侧入口不压缩:浏览器 worker 镜像只把 `yield*` 当作整条语句下沉,并按源码版式重写 `for await` 循环,压缩后的输入会同时破坏这两者。 + +`@deepseek-ai/dsh` 通过 [`scripts/stage-dsh-docs.ts`](../../../../scripts/stage-dsh-docs.ts) 在自己的 `prepack` 生命周期里把这一集合复制到 `apps/cli/docs`,并在 `postpack` 中再次删除这份副本。集合包含:网站清单中的 Markdown、`docs/upgrade-guide/` 下的全部文档,以及这些页面引用的非 Markdown 资产。暂存时还会生成 `docs/upgrade-guide/README.md`:按每个 `v` 目录升级前的版本分组,列出每份指南的标题、中英文描述与两种语言的相对路径;仓库树本身不保留索引。生成的 `docs/persistence-changes/` 记录、`docs/i18n/` 规范与 `*.i18n.yaml` 一致性记录不发布。vendored 族保持上游 payload 不变([发布序列](2026-08-10-npm-release-sequences.zh.md))。 + +桌面版在 `app.asar` 内保留 `src/` 与 `@deepseek-ai/dsh` 的 `docs/` 树,agent 可在其中读取已安装版本的文档与代码;其[运行时文件策略](../../../../apps/desktop/scripts/runtime-file-policy.ts)仍剔除全部声明文件与映射。普通工具打不开归档内条目,因此 [`dsh-shell-env`](../../../../packages/shell/shell-env/README.zh.md) 为每次模型 shell 调用提供 `DSH_INSTALL_DIR`(`@deepseek-ai/dsh` 包目录)与 `DSH_NODE_EXECUTABLE`(运行 Harness 的可执行文件);桌面版下它是 Electron,其 Node 模式(`ELECTRON_RUN_AS_NODE=1`)能读取归档。Python 单文件可执行体不付出代价:[`PUBLISHED_PAYLOAD_IGNORES`](../../../../scripts/build-exe-for-python-sdk.ts) 排除同样的树,因此其内容不取决于检出中是否残留暂存的 `docs`。 + +## Alternatives considered + +**保持只发声明文件,把读者引向文档网站或匹配的 `dsh-v*` tag。** 否决:两者都不是已安装的版本,而网站提供的是最新已发布版本而非预发布版本。声明的 `./src/*` 导出没有这些文件也毫无意义。 + +**只发布映射,不发布 `src`。** 否决:`sources` 不存在的映射解析不到任何东西,而这正是 [Typert Remote 设计](../architecture/2026-08-02-typert-remote-method-calls.zh.md)所要求的导航。 + +**整树发布,或只发布网站页面集合。** 两个极端都否决。整树会把已安装读者并不需要的维护者材料发出去——事故复盘、测试指南、Agent 指令与生成的迁移记录;而只发网站页面集合会漏掉升级指南,也就是已发布改动造成破坏时读者真正要查的文档。 + +**连标识符一起混淆。** 否决:混淆会破坏已发布 map 本应提供的对应关系,并使未处理栈帧无法阅读。 + +**连 Node 侧入口一起压缩。** 否决:浏览器 worker 镜像拒绝压缩后的输入——打包器会拒绝被压缩器挪进表达式的 `yield*`,并且对 `dsh-agent-instructions` 产出无法解析的代码。这两条都是下沉变换的限制,不是体积上的理由。 + +## Consequences + +`src` 在整个发布集上增加约 29 MB,声明映射增加约 10 MB,JavaScript map 增加约 49 MB,暂存的文档以 320 个文件给 `@deepseek-ai/dsh` 增加 6.4 MB。压缩让浏览器 bundle 约减少三分之一——`ui-chat` 的 `lib/client.js` 从 591 kB 降到 420 kB——而 Node 侧入口在 worker 镜像接受压缩输入之前保持原体积。macOS arm64 的 `app.asar` 增加约 20 MB `src` 与 5 MB 文档;Python 可执行体保持原有载荷。 + +消费方编辑器现在可以从声明跳转到已安装的实现,插件作者无需检出即可读到该版本的文档。暂存副本保留仓库的相对链接,因此指向 `../packages/**` 或指向被排除的 `persistence-changes/` 记录的链接只在检出中可解析。`docs/` 只在 `prepack` 与 `postpack` 之间存在于工作树,`pnpm run clean` 会清掉被中断的打包留下的副本。 + +`pnpm run constraints` 会拒绝 `files` 中缺少 `src` 或任一声明映射的发布成员,因为该清单是精确匹配的。发布族的 tarball 校验要求 `@deepseek-ai/dsh` 必须带上文档、升级指南索引与源码,因此跳过暂存钩子的打包会直接失败,而不是发出一个缺少它们的包。 diff --git a/.gitignore b/.gitignore index 51b7cf53dd..6255c7081b 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ python/**/__pycache__/ python/**/.pytest_cache/ packages/**/__pycache__/ apps/web/dist/ +apps/cli/docs/ .artifacts/ .dsh-build/ .dsh-report/ diff --git a/apps/cli/README.i18n.yaml b/apps/cli/README.i18n.yaml index 1ec1be3c64..a035a44693 100644 --- a/apps/cli/README.i18n.yaml +++ b/apps/cli/README.i18n.yaml @@ -17,6 +17,9 @@ /deepseek-ai-dsh/optional-overlays: en: 3a40ddc44e55f79c zh: 8d3949132e1ef93c +/deepseek-ai-dsh/installed-payload: + en: c19f3d56f611f173 + zh: 5002a7a318414960 /deepseek-ai-dsh/development: en: 0a289c1235869927 zh: a1f473f70036ad37 diff --git a/apps/cli/README.md b/apps/cli/README.md index b0059efecd..644eba2aa5 100644 --- a/apps/cli/README.md +++ b/apps/cli/README.md @@ -53,6 +53,12 @@ The [CLI behavior reference](reference/README.md) owns exact layer precedence, f `config/examples/` ships opt-in overlays for GitHub review webhooks, memory MCP servers, and runtime Cordis tools. They are never part of a default profile; the [user guides](../../docs/user/guide/index.md) and [developer practice guides](../../docs/user/develop/practice/index.md) own setup and safety instructions. +## Installed payload + +The published tarball carries the bundled runtime under `lib/`, the TypeScript under `src/`, the declaration and JavaScript maps beside the files they describe, and the documentation under `docs/`. Only `prepack` stages `docs/`, and `postpack` removes that copy again, so a reader of the working tree sees whatever the checkout holds. + +`docs/` holds the documentation website's pages plus every upgrade guide, with the assets those pages reference. `docs/upgrade-guide/README.md` is generated during staging: it groups the guides by the release each `v` directory upgrades from and lists each guide's title, English and Chinese descriptions, and relative paths. The Desktop application carries the same `docs/` and `src/` inside its `app.asar`. The generated `persistence-changes/` records, the `i18n/` guidelines, and the `*.i18n.yaml` consistency records are not published. Its pages keep the repository's relative links, so a link into `../packages/**` or into the omitted `persistence-changes/` records resolves only in a checkout. + ## Development Production runs require built package and frontend artifacts. From the repository root, run `pnpm run build` separately, then use `pnpm dsh ` to run the TypeScript entry and forward every argument; the [source-execution reference](reference/README.md#source-execution) owns the module-resolution contract. diff --git a/apps/cli/README.zh.md b/apps/cli/README.zh.md index 810126e839..318e12440f 100644 --- a/apps/cli/README.zh.md +++ b/apps/cli/README.zh.md @@ -53,6 +53,12 @@ profile 目录包含一个 `package.json`,其中记录树外插件依赖,以 `config/examples/` 交付 GitHub 评审 webhook、记忆 MCP 服务器与运行时 Cordis 工具的可选覆盖层。它们绝不属于默认 profile;设置与安全说明由[用户指南](../../docs/user/guide/index.zh.md)和[开发实战指南](../../docs/user/develop/practice/index.zh.md)负责。 +## 安装包内容 + +发布 tarball 在 `lib/` 下携带打包后的运行时,在 `src/` 下携带 TypeScript 源码,在各自描述的文件旁携带声明映射与 JavaScript map,并在 `docs/` 下携带文档。只有 `prepack` 会暂存 `docs/`,`postpack` 又会删除这份副本,因此工作树里的读者看到的始终是检出当前的内容。 + +`docs/` 包含文档网站的页面与全部升级指南,以及这些页面引用的资产。`docs/upgrade-guide/README.md` 在暂存时生成:它按每个 `v` 目录升级前的版本对指南分组,列出每份指南的标题、中英文描述与相对路径。桌面应用在其 `app.asar` 内携带同样的 `docs/` 与 `src/`。生成的 `persistence-changes/` 记录、`i18n/` 规范与 `*.i18n.yaml` 一致性记录不发布。其中的页面保留仓库的相对链接,因此指向 `../packages/**` 或指向被排除的 `persistence-changes/` 记录的链接只在检出中可解析。 + ## 开发 生产运行需要已构建的包与前端产物。请在仓库根目录单独运行 `pnpm run build`,然后使用 `pnpm dsh ` 运行 TypeScript 入口并转发所有参数;模块解析约定以[源码执行参考](reference/README.zh.md#source-execution)为准。 diff --git a/apps/cli/package.json b/apps/cli/package.json index 8871c8738d..4be57e7f46 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -16,8 +16,16 @@ }, "files": [ "lib/*.js", - "lib/types/*.d.ts" + "lib/*.js.map", + "lib/types/*.d.ts", + "lib/types/*.d.ts.map", + "docs", + "src" ], + "scripts": { + "prepack": "tsx ../../scripts/stage-dsh-docs.ts", + "postpack": "tsx ../../scripts/stage-dsh-docs.ts --clean" + }, "license": "MIT", "dependencies": { "@deepseek-ai/cordis": "workspace:~", diff --git a/apps/desktop/tests/installed-docs-asar.built.e2e.ts b/apps/desktop/tests/installed-docs-asar.built.e2e.ts new file mode 100644 index 0000000000..3d684892b9 --- /dev/null +++ b/apps/desktop/tests/installed-docs-asar.built.e2e.ts @@ -0,0 +1,93 @@ +/** A Windows model shell must read installed documentation inside the Desktop archive through Electron's Node mode. */ +import { spawnSync } from 'node:child_process' +import { mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises' +import { createRequire } from 'node:module' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { finished } from 'node:stream/promises' +import type { WriteStream } from 'node:fs' +import { expect, it } from 'vitest' + +const require = createRequire(import.meta.url) +const builderRequire = createRequire(require.resolve('app-builder-lib/package.json')) +const { createPackageWithOptions } = builderRequire('@electron/asar') as { + createPackageWithOptions: (source: string, destination: string, options: object) => Promise +} + +/** Reads a bounded line range below `DSH_INSTALL_DIR`; a missing file prints its code and exits 1. */ +const READ_SCRIPT = ` +const fs = require("node:fs"), path = require("node:path") +const [target, first = "1", count = "200"] = process.argv.slice(1) +const file = path.resolve(process.env.DSH_INSTALL_DIR, target) +try { + const lines = fs.readFileSync(file, "utf8").split("\\n") + const start = Math.max(1, Number(first)), end = Math.min(lines.length, start + Number(count) - 1) + for (let n = start; n <= end; n++) console.log(\`\${n}\\t\${lines[n - 1].slice(0, 2000)}\`) + if (end < lines.length) console.log(\`[\${lines.length - end} more lines]\`) +} catch (error) { console.error(\`\${error.code ?? "ERROR"}: \${file}\`); process.exitCode = 1 } +` + +/** + * The Electron executable is a GUI-subsystem program: PowerShell's call operator does not wait for it, so + * captured output arrives empty and the exit code is not its own. The Windows form starts it as a .NET + * process with redirected streams and waits for its exit code; the console encoding only lets this test + * decode what the probe relays. + */ +const POWERSHELL_PROBE = `param([string]$Target, [string]$First, [string]$Count) +[Console]::OutputEncoding = [System.Text.UTF8Encoding]::new($false) +$script = @' +${READ_SCRIPT} +'@ +$start = [System.Diagnostics.ProcessStartInfo]::new($env:DSH_NODE_EXECUTABLE) +foreach ($argument in @('-e', $script, '--', $Target, $First, $Count)) { $start.ArgumentList.Add($argument) } +$start.Environment['ELECTRON_RUN_AS_NODE'] = '1' +$start.UseShellExecute = $false +$start.RedirectStandardOutput = $true +$start.RedirectStandardError = $true +$start.StandardOutputEncoding = [System.Text.Encoding]::UTF8 +$start.StandardErrorEncoding = [System.Text.Encoding]::UTF8 +$process = [System.Diagnostics.Process]::Start($start) +$stderr = $process.StandardError.ReadToEndAsync() +$stdout = $process.StandardOutput.ReadToEnd() +$process.WaitForExit() +[Console]::Out.Write($stdout) +[Console]::Error.Write($stderr.Result) +exit $process.ExitCode +` + +// macOS packaged-application coverage is manual; the POSIX form needs no output capture workaround. +it.skipIf(process.platform !== 'win32' || process.env.DSH_EXAMPLE_MODE !== 'lib')('reads archived documentation through the PowerShell form', { retry: 0 }, async () => { + const electron = require('electron') as string + const root = await mkdtemp(join(tmpdir(), 'dsh 文档 asar-')) + try { + const source = join(root, 'source') + await mkdir(join(source, 'docs', 'upgrade-guide'), { recursive: true }) + await writeFile(join(source, 'package.json'), '{"name":"@deepseek-ai/dsh"}\n') + await writeFile(join(source, 'docs', 'upgrade-guide', 'README.md'), '# 升级指南\n\n第二行\n第三行\n') + const archive = join(root, '安装 目录', 'app.asar') + await mkdir(join(archive, '..')) + await finished(await createPackageWithOptions(source, archive, {})) + const probe = join(root, 'probe.ps1') + await writeFile(probe, POWERSHELL_PROBE) + const run = (target: string, first: string, count: string) => { + const result = spawnSync('pwsh', ['-NoProfile', '-NonInteractive', '-File', probe, target, first, count], { + env: { ...process.env, DSH_NODE_EXECUTABLE: electron, DSH_INSTALL_DIR: archive }, + encoding: 'utf8', timeout: 60_000, windowsHide: true, + }) + expect(result.error).toBeUndefined() + expect(result.signal).toBeNull() + return { status: result.status, stdout: result.stdout.replaceAll('\r\n', '\n'), stderr: result.stderr } + } + + const read = run('docs/upgrade-guide/README.md', '1', '2') + expect(read.status, read.stderr).toBe(0) + expect(read.stdout).toBe('1\t# 升级指南\n2\t\n[3 more lines]\n') + + const missing = run('docs/upgrade-guide/missing.md', '1', '2') + expect(missing.status).toBe(1) + expect(missing.stdout).toBe('') + expect(missing.stderr).toContain(`ENOENT: ${join(archive, 'docs', 'upgrade-guide', 'missing.md')}`) + } finally { + await rm(root, { recursive: true, force: true }) + } +}) diff --git a/apps/desktop/tests/pack-local-packages.spec.ts b/apps/desktop/tests/pack-local-packages.spec.ts index 14d55a0a8b..4faea2d9e2 100644 --- a/apps/desktop/tests/pack-local-packages.spec.ts +++ b/apps/desktop/tests/pack-local-packages.spec.ts @@ -103,10 +103,17 @@ it('rejects local client artifacts in the release packing command', async () => it('validates local tarball contents before reporting success', async () => { const root = fixture() - write(root, 'packages/client/probe/src/index.ts', 'export const source = true\n') + write(root, 'pnpm-workspace.yaml', 'packages:\n - packages/*/*\n - apps/*\n') + write(root, 'apps/cli/package.json', JSON.stringify({ name: '@deepseek-ai/dsh', version: '1.2.3', files: ['lib', 'src'] })) + write(root, 'apps/cli/lib/index.js', 'export const cli = true\n') + write(root, 'apps/cli/src/bin.ts', 'export const bin = true\n') + for (const name of ['subagent-claude-code', 'subagent-codex']) { + write(root, `packages/subagent/${name}/package.json`, JSON.stringify({ name: `@deepseek-ai/dsh-${name}`, version: '1.2.3', files: ['lib'] })) + write(root, `packages/subagent/${name}/lib/index.js`, 'export const bundle = true\n') + } const result = await pack(root) expect(result.code).not.toBe(0) - expect(result.output).toContain('publishes source file package/src/index.ts') + expect(result.output).toContain('@deepseek-ai/dsh packed no documentation') }, testTimeout) it('rejects an invalid local pack concurrency before replacing packages', async () => { diff --git a/apps/desktop/tests/runtime-file-policy.spec.ts b/apps/desktop/tests/runtime-file-policy.spec.ts index b08c6489a0..08007542fe 100644 --- a/apps/desktop/tests/runtime-file-policy.spec.ts +++ b/apps/desktop/tests/runtime-file-policy.spec.ts @@ -53,6 +53,12 @@ it('omits development artifacts while preserving executable modules, assets and '@deepseek-ai/libreoffice-kit-win32-x64/bin/dsoffice.exe', '@deepseek-ai/libreoffice-kit-win32-x64/sources/core-source.json', '@deepseek-ai/libreoffice-kit-win32-x64/licenses/MPL-2.0.txt', + '@deepseek-ai/dsh/lib/index.js', '@deepseek-ai/dsh/lib/bin.js', + '@deepseek-ai/dsh-session/lib/index.js', + '@deepseek-ai/dsh/src/bin.ts', '@deepseek-ai/dsh/docs/architecture.md', + '@deepseek-ai/dsh/docs/upgrade-guide/v0.2.0/example/guide.md', + '@deepseek-ai/dsh-session/src/index.ts', + '@deepseek-ai/dsh-client-ui-chat/src/client/Page.tsx', ] try { const runtime = runtimeFixture(source) diff --git a/apps/web/package.json b/apps/web/package.json index 8d0e68b500..5ac5400998 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -17,9 +17,9 @@ }, "files": [ "dist", - "!dist/**/*.map", "!dist/preview.html", - "!dist/preview" + "!dist/preview", + "src" ], "scripts": { "build": "vite build", diff --git a/docs/config-catalog.md b/docs/config-catalog.md index 313c56173e..0d9387b5fc 100644 --- a/docs/config-catalog.md +++ b/docs/config-catalog.md @@ -3356,7 +3356,7 @@ export interface Config extends SessionTitleLlmConfig { ## `@deepseek-ai/dsh-shell-env` -- `source`: [`packages/shell/shell-env/src/index.ts:30`](../packages/shell/shell-env/src/index.ts) +- `source`: [`packages/shell/shell-env/src/index.ts:31`](../packages/shell/shell-env/src/index.ts) ```ts config-catalog /** Plugin config (all optional — the built-in facts resolve without defaults). */ diff --git a/docs/config-catalog.zh.md b/docs/config-catalog.zh.md index ab71485226..a91c24c6bb 100644 --- a/docs/config-catalog.zh.md +++ b/docs/config-catalog.zh.md @@ -3358,7 +3358,7 @@ export interface Config extends SessionTitleLlmConfig { ## `@deepseek-ai/dsh-shell-env` -- `source`: [`packages/shell/shell-env/src/index.ts:30`](../packages/shell/shell-env/src/index.ts) +- `source`: [`packages/shell/shell-env/src/index.ts:31`](../packages/shell/shell-env/src/index.ts) ```ts config-catalog /** Plugin config (all optional — the built-in facts resolve without defaults). */ diff --git a/docs/cookbook/adding-a-package.i18n.yaml b/docs/cookbook/adding-a-package.i18n.yaml index 28ee60cb3d..5f9ee81f66 100644 --- a/docs/cookbook/adding-a-package.i18n.yaml +++ b/docs/cookbook/adding-a-package.i18n.yaml @@ -6,8 +6,8 @@ en: b94bcdbebcd6355e zh: 9fd61c2b986da759 /cookbook-adding-a-workspace-package/1-create-the-package: - en: 062249fc249b2fec - zh: f6b9fe7f63c4cbad + en: 8dced23a19db2c69 + zh: ad9021f9fe5e9bb2 /cookbook-adding-a-workspace-package/2-register-it-in-the-root-configs: en: 12b985dee93a47a7 zh: 1027db3d251cd860 diff --git a/docs/cookbook/adding-a-package.md b/docs/cookbook/adding-a-package.md index 16fe3e564f..7c8b051817 100644 --- a/docs/cookbook/adding-a-package.md +++ b/docs/cookbook/adding-a-package.md @@ -24,7 +24,7 @@ packages/// Choose an existing group when one matches the package's role (`core`, `llm`, `shell`, `compaction`, `subagent`, `todo`, `session`, `client`/`host`, `util`, or `test-support`). A new group is allowed, but it is a pure container: no `package.json`, no source files, and packages still sit exactly one level below it. -package.json invariants (enforced by `pnpm run constraints` / `scripts/check-workspace-constraints.ts`): `private: true`, a `version` matching the root `package.json`, `type: module`, `main: "lib/index.js"`, `types: "lib/types/index.d.ts"`, `exports["."].types: "./lib/types/index.d.ts"`, `exports["."].default: "./lib/index.js"`, `@deepseek-ai/cordis` in BOTH peerDependencies and devDependencies (same range). Mirror every dsh peer dependency in devDependencies. `@deepseek-ai/schemastery` goes in `dependencies` (it is a runtime validator), matching agent-loop. The `files` list contains exactly `lib/index.js`, `lib/types/**/*.d.ts`, and package-specific runtime artifacts recognized by the gate. A package whose runtime export points into the emitted tree also includes `lib/types/**/*.js`. Do not publish `src`, declaration maps, JS maps, or stale root declaration files. CLI app packages with a package `bin` include `lib/bin.js` immediately after `lib/index.js` in `files`. +package.json invariants (enforced by `pnpm run constraints` / `scripts/check-workspace-constraints.ts`): `private: true`, a `version` matching the root `package.json`, `type: module`, `main: "lib/index.js"`, `types: "lib/types/index.d.ts"`, `exports["."].types: "./lib/types/index.d.ts"`, `exports["."].default: "./lib/index.js"`, `@deepseek-ai/cordis` in BOTH peerDependencies and devDependencies (same range). Mirror every dsh peer dependency in devDependencies. `@deepseek-ai/schemastery` goes in `dependencies` (it is a runtime validator), matching agent-loop. The `files` list contains exactly `lib/index.js`, `lib/types/**/*.d.ts`, `lib/types/**/*.d.ts.map`, `src`, and package-specific runtime artifacts recognized by the gate. A package whose runtime export points into the emitted tree also includes `lib/types/**/*.js`. Declaration and JavaScript maps publish beside the files they describe, and `src` publishes with them, so a consumer editor and a plugin author read the implementation behind an exported declaration; do not publish stale root declaration files. CLI app packages with a package `bin` include `lib/bin.js` immediately after `lib/index.js` in `files`. In-package relative imports use explicit `.ts` specifiers in source (for example, `export * from './types.ts'`). The compiler rewrites those to `.js` in emitted JS and leaves explicit `.ts` specifiers in declarations, which standard NodeNext/Node16 TypeScript consumers resolve to the sibling `.d.ts` files. diff --git a/docs/cookbook/adding-a-package.zh.md b/docs/cookbook/adding-a-package.zh.md index 0d74f645dc..68cde8056a 100644 --- a/docs/cookbook/adding-a-package.zh.md +++ b/docs/cookbook/adding-a-package.zh.md @@ -24,7 +24,7 @@ packages/// 当已有分组与包的角色匹配时,选择该分组(`core`、`llm`、`shell`、`compaction`、`subagent`、`todo`、`session`、`client`/`host`、`util` 或 `test-support`)。允许新建分组,但分组只是纯容器:没有 `package.json`,没有源文件,包仍然恰好位于其下一层。 -package.json 不变式(由 `pnpm run constraints` / `scripts/check-workspace-constraints.ts` 强制执行):`private: true`,`version` 与根 `package.json` 一致,`type: module`,`main: "lib/index.js"`,`types: "lib/types/index.d.ts"`,`exports["."].types: "./lib/types/index.d.ts"`,`exports["."].default: "./lib/index.js"`,`@deepseek-ai/cordis` 同时出现在 peerDependencies 和 devDependencies 中(相同范围)。每个 dsh 对等依赖(peer dependency)都要在 devDependencies 中镜像。`@deepseek-ai/schemastery` 放在 `dependencies` 中(它是运行时校验器),与 agent-loop 保持一致。`files` 列表精确包含 `lib/index.js`、`lib/types/**/*.d.ts` 以及门禁认可的包专用运行时产物。如果包的运行时 export 指向输出树,还要包含 `lib/types/**/*.js`。不要发布 `src`、声明映射、JS map 或陈旧的根声明文件。带有 `bin` 的 CLI 应用包在 `files` 中将 `lib/bin.js` 紧跟在 `lib/index.js` 之后。 +package.json 不变式(由 `pnpm run constraints` / `scripts/check-workspace-constraints.ts` 强制执行):`private: true`,`version` 与根 `package.json` 一致,`type: module`,`main: "lib/index.js"`,`types: "lib/types/index.d.ts"`,`exports["."].types: "./lib/types/index.d.ts"`,`exports["."].default: "./lib/index.js"`,`@deepseek-ai/cordis` 同时出现在 peerDependencies 和 devDependencies 中(相同范围)。每个 dsh 对等依赖(peer dependency)都要在 devDependencies 中镜像。`@deepseek-ai/schemastery` 放在 `dependencies` 中(它是运行时校验器),与 agent-loop 保持一致。`files` 列表精确包含 `lib/index.js`、`lib/types/**/*.d.ts`、`lib/types/**/*.d.ts.map`、`src` 以及门禁认可的包专用运行时产物。如果包的运行时 export 指向输出树,还要包含 `lib/types/**/*.js`。声明映射与 JavaScript map 随各自描述的产物一起发布,`src` 也随之发布,让消费方编辑器和插件作者都能读到导出声明背后的实现;不要发布陈旧的根声明文件。带有 `bin` 的 CLI 应用包在 `files` 中将 `lib/bin.js` 紧跟在 `lib/index.js` 之后。 包内的相对导入在源码中使用显式 `.ts` 后缀(例如 `export * from './types.ts'`)。编译器在输出的 JS 中将其重写为 `.js`,在声明文件中保留显式 `.ts` 后缀;标准的 NodeNext/Node16 TypeScript 消费方会将其解析到同目录的 `.d.ts` 文件。 diff --git a/packages/acp/acp/package.json b/packages/acp/acp/package.json index 890dbb7a99..9a54c5dd58 100644 --- a/packages/acp/acp/package.json +++ b/packages/acp/acp/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/account-controller/package.json b/packages/api/account-controller/package.json index 91a9c97e6c..92a16ff401 100644 --- a/packages/api/account-controller/package.json +++ b/packages/api/account-controller/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/gateway/package.json b/packages/api/gateway/package.json index 3d174eb272..2cb64bbef0 100644 --- a/packages/api/gateway/package.json +++ b/packages/api/gateway/package.json @@ -56,7 +56,10 @@ "lib/client.browser.js", "lib/client.node.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/job-controller/package.json b/packages/api/job-controller/package.json index f69a84b2e8..e260a52a6c 100644 --- a/packages/api/job-controller/package.json +++ b/packages/api/job-controller/package.json @@ -60,10 +60,14 @@ "lib/client.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/remote-access/package.json b/packages/api/remote-access/package.json index 5b8ecd6271..bd5eeae185 100644 --- a/packages/api/remote-access/package.json +++ b/packages/api/remote-access/package.json @@ -60,10 +60,14 @@ "lib/client.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/remotes/package.json b/packages/api/remotes/package.json index 49b31085af..565e54a21c 100644 --- a/packages/api/remotes/package.json +++ b/packages/api/remotes/package.json @@ -49,7 +49,10 @@ "lib/index.js", "lib/client.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/dsh-deque": "workspace:*", diff --git a/packages/api/session-controller/package.json b/packages/api/session-controller/package.json index d69f6937e6..de01132dfe 100644 --- a/packages/api/session-controller/package.json +++ b/packages/api/session-controller/package.json @@ -64,10 +64,14 @@ "lib/client.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/settings-controller/package.json b/packages/api/settings-controller/package.json index 44131d5a0c..58b97828be 100644 --- a/packages/api/settings-controller/package.json +++ b/packages/api/settings-controller/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/terminal-controller/package.json b/packages/api/terminal-controller/package.json index 8ef7f85aa5..10accccc71 100644 --- a/packages/api/terminal-controller/package.json +++ b/packages/api/terminal-controller/package.json @@ -92,9 +92,13 @@ "lib/client.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ] } diff --git a/packages/api/workspace-controller/package.json b/packages/api/workspace-controller/package.json index 57f2fc4c19..c3044168fe 100644 --- a/packages/api/workspace-controller/package.json +++ b/packages/api/workspace-controller/package.json @@ -64,10 +64,14 @@ "lib/client.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/api/workspace-files/package.json b/packages/api/workspace-files/package.json index c31bc27569..f24b37ef8c 100644 --- a/packages/api/workspace-files/package.json +++ b/packages/api/workspace-files/package.json @@ -81,9 +81,13 @@ "lib/client.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ] } diff --git a/packages/attachment/attachment-local/package.json b/packages/attachment/attachment-local/package.json index f8e459ea47..28aae50c7b 100644 --- a/packages/attachment/attachment-local/package.json +++ b/packages/attachment/attachment-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/attachment/attachment/package.json b/packages/attachment/attachment/package.json index 511ef848a1..79c35fd196 100644 --- a/packages/attachment/attachment/package.json +++ b/packages/attachment/attachment/package.json @@ -19,7 +19,7 @@ "./src/*": "./src/*", "./package.json": "./package.json" }, - "files": ["lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts"], + "files": ["lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", "lib/types/**/*.d.ts.map", "lib/**/*.js.map", "src"], "license": "MIT", "peerDependencies": { "@deepseek-ai/dsh-brand": "workspace:*", diff --git a/packages/boot/app-boot/package.json b/packages/boot/app-boot/package.json index 79f3185ca3..108eb792ee 100644 --- a/packages/boot/app-boot/package.json +++ b/packages/boot/app-boot/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/worker/profile-resolution-bootstrap.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/boot/cmdline/package.json b/packages/boot/cmdline/package.json index 9e8a2f3a13..9a50bff2a0 100644 --- a/packages/boot/cmdline/package.json +++ b/packages/boot/cmdline/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/boot/config-editor/package.json b/packages/boot/config-editor/package.json index bc4eab657a..1560233646 100644 --- a/packages/boot/config-editor/package.json +++ b/packages/boot/config-editor/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/boot/hmr/package.json b/packages/boot/hmr/package.json index fb22be9ef4..5e6a517cd7 100644 --- a/packages/boot/hmr/package.json +++ b/packages/boot/hmr/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "author": "Shigma ", "license": "MIT", diff --git a/packages/boot/plugin-manager/package.json b/packages/boot/plugin-manager/package.json index 834862e01d..9db014068e 100644 --- a/packages/boot/plugin-manager/package.json +++ b/packages/boot/plugin-manager/package.json @@ -57,10 +57,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/boot/plugin-market/package.json b/packages/boot/plugin-market/package.json index 0f5e523d40..5d65a78b94 100644 --- a/packages/boot/plugin-market/package.json +++ b/packages/boot/plugin-market/package.json @@ -44,10 +44,14 @@ "lib/worker.cjs", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/browser-use/browser-use/package.json b/packages/browser-use/browser-use/package.json index 5deb045263..e2e8fa0edd 100644 --- a/packages/browser-use/browser-use/package.json +++ b/packages/browser-use/browser-use/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/bundle/acp-app/package.json b/packages/bundle/acp-app/package.json index 31bd455a9f..82bb315e7c 100644 --- a/packages/bundle/acp-app/package.json +++ b/packages/bundle/acp-app/package.json @@ -27,7 +27,10 @@ "locale/*.json", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/bundle/base/package.json b/packages/bundle/base/package.json index 6c0e67be91..cba883cd57 100644 --- a/packages/bundle/base/package.json +++ b/packages/bundle/base/package.json @@ -25,7 +25,10 @@ "files": [ "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/bundle/headless/package.json b/packages/bundle/headless/package.json index 41b4adaef7..d47abd4ca9 100644 --- a/packages/bundle/headless/package.json +++ b/packages/bundle/headless/package.json @@ -33,7 +33,10 @@ "lib/startup.js", "cordis.patch.yml", "lib/json-stream-*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/bundle/sdk-app/package.json b/packages/bundle/sdk-app/package.json index bfdfeccea3..c683538d68 100644 --- a/packages/bundle/sdk-app/package.json +++ b/packages/bundle/sdk-app/package.json @@ -27,7 +27,10 @@ "locale/*.json", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/bundle/sdk-minimal/package.json b/packages/bundle/sdk-minimal/package.json index 6036db0f83..262dc98be8 100644 --- a/packages/bundle/sdk-minimal/package.json +++ b/packages/bundle/sdk-minimal/package.json @@ -25,7 +25,10 @@ "files": [ "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/bundle/web-app/package.json b/packages/bundle/web-app/package.json index becb896dbd..dd4860c5c0 100644 --- a/packages/bundle/web-app/package.json +++ b/packages/bundle/web-app/package.json @@ -40,7 +40,10 @@ "presets/minimal.patch.yml", "presets/cordis.patch.yml", "lib/public-url-*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/client/connection/package.json b/packages/client/connection/package.json index e8c1716121..06f11a1548 100644 --- a/packages/client/connection/package.json +++ b/packages/client/connection/package.json @@ -46,7 +46,10 @@ "lib/index.js", "lib/client.browser.js", "lib/client.node.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~", diff --git a/packages/client/file-upload/package.json b/packages/client/file-upload/package.json index 5d7efb07fe..46eeee5abe 100644 --- a/packages/client/file-upload/package.json +++ b/packages/client/file-upload/package.json @@ -58,10 +58,14 @@ "lib/client.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "dependencies": { "zod": "4.4.3", diff --git a/packages/client/hmr/package.json b/packages/client/hmr/package.json index fc481dc010..d92121c57e 100644 --- a/packages/client/hmr/package.json +++ b/packages/client/hmr/package.json @@ -53,6 +53,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/locale/package.json b/packages/client/locale/package.json index 5d72df63c4..3e21127719 100644 --- a/packages/client/locale/package.json +++ b/packages/client/locale/package.json @@ -63,7 +63,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "scripts": { "bundle": "tsdown", diff --git a/packages/client/modules/package.json b/packages/client/modules/package.json index 3e297ac8a6..a30a066c12 100644 --- a/packages/client/modules/package.json +++ b/packages/client/modules/package.json @@ -49,7 +49,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~" diff --git a/packages/client/product-analytics/package.json b/packages/client/product-analytics/package.json index 46c2a95f73..6f03c85430 100644 --- a/packages/client/product-analytics/package.json +++ b/packages/client/product-analytics/package.json @@ -73,10 +73,14 @@ "lib/index.js", "lib/client.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "dependencies": { "@deepseek-ai/dsh-typert-protocol": "workspace:*", diff --git a/packages/client/resources/package.json b/packages/client/resources/package.json index d5e9b33309..c554b2a178 100644 --- a/packages/client/resources/package.json +++ b/packages/client/resources/package.json @@ -54,6 +54,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/shortcuts/package.json b/packages/client/shortcuts/package.json index 823eb82908..c4fe99087f 100644 --- a/packages/client/shortcuts/package.json +++ b/packages/client/shortcuts/package.json @@ -60,7 +60,10 @@ "lib/index.js", "lib/client.js", "lib/protocol.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/dsh-util-crypto": "workspace:*", diff --git a/packages/client/store/package.json b/packages/client/store/package.json index 1051b029c2..64e7f1c38c 100644 --- a/packages/client/store/package.json +++ b/packages/client/store/package.json @@ -32,6 +32,9 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/tsdown.client.ts b/packages/client/tsdown.client.ts index 8895b1dce9..7df6b6f529 100644 --- a/packages/client/tsdown.client.ts +++ b/packages/client/tsdown.client.ts @@ -239,7 +239,10 @@ interface ClientBundleOptions { readonly companions?: readonly UserConfig[] /** Overrides for the package's primary Node-side library config. */ readonly lib?: UserConfig - /** Optional legal or attribution text selected by emitted client filename. */ + /** + * Optional legal or attribution text selected by emitted client filename. The preset prepends it after + * minification, so its comment lines reach the artifact byte for byte. + */ readonly clientBanner?: (fileName: string) => string | undefined } @@ -797,6 +800,12 @@ function clientConfig( // Plugin code is fetched outside Vite's module graph, so its own bundle // must carry the TS/TSX mapping consumed by browser profiling tools. sourcemap: true, + // Compress the browser bundle's text while identifier names stay readable + // and the source map still resolves through the published `src`. The + // compressor stays off: the browser worker image lowers `yield*` only as a + // whole statement, and a compressor that folds statements into expressions + // hides it. + minify: { compress: false, mangle: false }, clean: false, deps: { neverBundle: isRequested, @@ -929,10 +938,10 @@ function clientConfig( isolation.sourcePath(source, mapPath) return browserSourcePath(source, mapPath) }, - banner: (chunk) => { - const registration = `window.__ModuleLoader__.load({ id: ${JSON.stringify(id)}, ${chunk.isEntry ? '' : `chunk: ${JSON.stringify(chunk.fileName)}, `}factory: (require) => {` + banner: chunk => `window.__ModuleLoader__.load({ id: ${JSON.stringify(id)}, ${chunk.isEntry ? '' : `chunk: ${JSON.stringify(chunk.fileName)}, `}factory: (require) => {`, + postBanner: (chunk) => { const prefix = clientBanner?.(chunk.fileName) - return prefix === undefined ? registration : `${prefix}\n${registration}` + return prefix === undefined ? '' : `${prefix}\n` }, footer: 'return module.exports; } });', intro: 'var module = { exports: {} }; var exports = module.exports;', diff --git a/packages/client/ui-agent-preset/package.json b/packages/client/ui-agent-preset/package.json index e50cffbdda..d60ad24bef 100644 --- a/packages/client/ui-agent-preset/package.json +++ b/packages/client/ui-agent-preset/package.json @@ -75,7 +75,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": {} } diff --git a/packages/client/ui-agent-team/package.json b/packages/client/ui-agent-team/package.json index 298818be7c..32fb78c0ec 100644 --- a/packages/client/ui-agent-team/package.json +++ b/packages/client/ui-agent-team/package.json @@ -75,6 +75,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-approval/package.json b/packages/client/ui-approval/package.json index 1ef5a7f32e..d0889ea071 100644 --- a/packages/client/ui-approval/package.json +++ b/packages/client/ui-approval/package.json @@ -68,6 +68,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-attachment/package.json b/packages/client/ui-attachment/package.json index 2bde53e466..f9484bfcb2 100644 --- a/packages/client/ui-attachment/package.json +++ b/packages/client/ui-attachment/package.json @@ -68,7 +68,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~" diff --git a/packages/client/ui-brand-official/package.json b/packages/client/ui-brand-official/package.json index 113326982d..b4f23db76e 100644 --- a/packages/client/ui-brand-official/package.json +++ b/packages/client/ui-brand-official/package.json @@ -61,6 +61,9 @@ "lib/index.js", "lib/client.js", "lib/assets", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-chat/package.json b/packages/client/ui-chat/package.json index 235f88807d..18667520c5 100644 --- a/packages/client/ui-chat/package.json +++ b/packages/client/ui-chat/package.json @@ -109,6 +109,9 @@ "lib/index.js", "lib/client.js", "lib/assets", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-commands/package.json b/packages/client/ui-commands/package.json index 5f64cbfa7e..be40237c4a 100644 --- a/packages/client/ui-commands/package.json +++ b/packages/client/ui-commands/package.json @@ -69,6 +69,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-context-menu/package.json b/packages/client/ui-context-menu/package.json index a2ae3ef78e..6ddabec73f 100644 --- a/packages/client/ui-context-menu/package.json +++ b/packages/client/ui-context-menu/package.json @@ -65,6 +65,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-conversation/package.json b/packages/client/ui-conversation/package.json index d1787e32c0..3491b214e3 100644 --- a/packages/client/ui-conversation/package.json +++ b/packages/client/ui-conversation/package.json @@ -106,6 +106,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-deliverables/package.json b/packages/client/ui-deliverables/package.json index ed61a67fc2..bd7b325586 100644 --- a/packages/client/ui-deliverables/package.json +++ b/packages/client/ui-deliverables/package.json @@ -88,7 +88,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/dsh-typert-protocol": "workspace:*" diff --git a/packages/client/ui-directory-picker-browse/package.json b/packages/client/ui-directory-picker-browse/package.json index de438eb948..034cd4647f 100644 --- a/packages/client/ui-directory-picker-browse/package.json +++ b/packages/client/ui-directory-picker-browse/package.json @@ -63,6 +63,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-directory-picker-native/package.json b/packages/client/ui-directory-picker-native/package.json index 366550254e..daa2eb6b35 100644 --- a/packages/client/ui-directory-picker-native/package.json +++ b/packages/client/ui-directory-picker-native/package.json @@ -57,6 +57,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-dockkit/package.json b/packages/client/ui-dockkit/package.json index 232b9231fc..87b424dfd9 100644 --- a/packages/client/ui-dockkit/package.json +++ b/packages/client/ui-dockkit/package.json @@ -34,7 +34,10 @@ "files": [ "lib/index.js", "lib/**/*.css", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~" diff --git a/packages/client/ui-entry-customization/package.json b/packages/client/ui-entry-customization/package.json index ffe79e4e41..0d64c29522 100644 --- a/packages/client/ui-entry-customization/package.json +++ b/packages/client/ui-entry-customization/package.json @@ -18,7 +18,15 @@ "./package.json": "./package.json", "./locale/*.json": "./locale/*.json" }, - "files": ["locale/*.json", "lib/index.js", "lib/client.js", "lib/types/**/*.d.ts"], + "files": [ + "locale/*.json", + "lib/index.js", + "lib/client.js", + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" + ], "license": "MIT", "peerDependencies": { "@deepseek-ai/cordis": "workspace:~" }, "devDependencies": { diff --git a/packages/client/ui-file-actions/package.json b/packages/client/ui-file-actions/package.json index 22f1e8afd0..07f9612828 100644 --- a/packages/client/ui-file-actions/package.json +++ b/packages/client/ui-file-actions/package.json @@ -68,6 +68,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-file-drag/package.json b/packages/client/ui-file-drag/package.json index 553112c987..18225f7c99 100644 --- a/packages/client/ui-file-drag/package.json +++ b/packages/client/ui-file-drag/package.json @@ -59,6 +59,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-goal/package.json b/packages/client/ui-goal/package.json index e188c8dc07..c46c077c89 100644 --- a/packages/client/ui-goal/package.json +++ b/packages/client/ui-goal/package.json @@ -72,6 +72,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-input-trigger/package.json b/packages/client/ui-input-trigger/package.json index c88e7a3f52..469efd796f 100644 --- a/packages/client/ui-input-trigger/package.json +++ b/packages/client/ui-input-trigger/package.json @@ -66,6 +66,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-jobs/package.json b/packages/client/ui-jobs/package.json index 21f93e95f5..2c8943e4c7 100644 --- a/packages/client/ui-jobs/package.json +++ b/packages/client/ui-jobs/package.json @@ -53,7 +53,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dsh": { "client": { diff --git a/packages/client/ui-layout/package.json b/packages/client/ui-layout/package.json index 37e3637588..b418ce3e95 100644 --- a/packages/client/ui-layout/package.json +++ b/packages/client/ui-layout/package.json @@ -62,6 +62,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-message-feedback/package.json b/packages/client/ui-message-feedback/package.json index 6145dd76ec..5c67e2ce03 100644 --- a/packages/client/ui-message-feedback/package.json +++ b/packages/client/ui-message-feedback/package.json @@ -73,6 +73,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-model-selection/package.json b/packages/client/ui-model-selection/package.json index 24a4e1f80e..549bcfab73 100644 --- a/packages/client/ui-model-selection/package.json +++ b/packages/client/ui-model-selection/package.json @@ -72,6 +72,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-open-in-app/package.json b/packages/client/ui-open-in-app/package.json index e3ec1c8acf..8e12ef41e6 100644 --- a/packages/client/ui-open-in-app/package.json +++ b/packages/client/ui-open-in-app/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "scripts": { "bundle": "tsdown", diff --git a/packages/client/ui-permission-presets/package.json b/packages/client/ui-permission-presets/package.json index 5c3c160dfd..0b49d98e4c 100644 --- a/packages/client/ui-permission-presets/package.json +++ b/packages/client/ui-permission-presets/package.json @@ -73,6 +73,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-plan/package.json b/packages/client/ui-plan/package.json index 174ee5fb56..4c87c9a9f8 100644 --- a/packages/client/ui-plan/package.json +++ b/packages/client/ui-plan/package.json @@ -77,6 +77,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-plugin-manager/package.json b/packages/client/ui-plugin-manager/package.json index f1f3226c4d..93b59863a4 100644 --- a/packages/client/ui-plugin-manager/package.json +++ b/packages/client/ui-plugin-manager/package.json @@ -81,10 +81,14 @@ "lib/index.js", "lib/client.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "dependencies": { "@deepseek-ai/dsh-timeout": "workspace:*", diff --git a/packages/client/ui-plugin-market/package.json b/packages/client/ui-plugin-market/package.json index 6417cbf6fa..aae48bfb81 100644 --- a/packages/client/ui-plugin-market/package.json +++ b/packages/client/ui-plugin-market/package.json @@ -67,6 +67,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-primitives/package.json b/packages/client/ui-primitives/package.json index bf0754ee00..02bb00cae3 100644 --- a/packages/client/ui-primitives/package.json +++ b/packages/client/ui-primitives/package.json @@ -55,7 +55,10 @@ "files": [ "lib/index.js", "lib/**/*.css", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~" diff --git a/packages/client/ui-reference/package.json b/packages/client/ui-reference/package.json index a460fc9a52..c452aa5d22 100644 --- a/packages/client/ui-reference/package.json +++ b/packages/client/ui-reference/package.json @@ -74,6 +74,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-renderer/package.json b/packages/client/ui-renderer/package.json index 401c266a6b..862fcfea75 100644 --- a/packages/client/ui-renderer/package.json +++ b/packages/client/ui-renderer/package.json @@ -53,6 +53,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-schedule/package.json b/packages/client/ui-schedule/package.json index ef9e664417..a87a770379 100644 --- a/packages/client/ui-schedule/package.json +++ b/packages/client/ui-schedule/package.json @@ -86,6 +86,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-secret-mask/package.json b/packages/client/ui-secret-mask/package.json index 773dd3feee..584abad79b 100644 --- a/packages/client/ui-secret-mask/package.json +++ b/packages/client/ui-secret-mask/package.json @@ -57,6 +57,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-session/package.json b/packages/client/ui-session/package.json index b1d0b3a3a5..11996a36b7 100644 --- a/packages/client/ui-session/package.json +++ b/packages/client/ui-session/package.json @@ -63,6 +63,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-account/package.json b/packages/client/ui-settings-account/package.json index 0be4fa27c1..c4086a3ef2 100644 --- a/packages/client/ui-settings-account/package.json +++ b/packages/client/ui-settings-account/package.json @@ -78,7 +78,10 @@ "lib/index.js", "lib/client.js", "lib/assets", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/schemastery": "workspace:~" diff --git a/packages/client/ui-settings-agent-loop/package.json b/packages/client/ui-settings-agent-loop/package.json index 2dde616624..b61c80d26d 100644 --- a/packages/client/ui-settings-agent-loop/package.json +++ b/packages/client/ui-settings-agent-loop/package.json @@ -61,6 +61,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-general/package.json b/packages/client/ui-settings-general/package.json index 763f7951ec..0e804d9563 100644 --- a/packages/client/ui-settings-general/package.json +++ b/packages/client/ui-settings-general/package.json @@ -83,6 +83,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-models/package.json b/packages/client/ui-settings-models/package.json index 42f4ff1b76..b0c740304a 100644 --- a/packages/client/ui-settings-models/package.json +++ b/packages/client/ui-settings-models/package.json @@ -67,6 +67,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-plugin-inventory/package.json b/packages/client/ui-settings-plugin-inventory/package.json index 408a843a45..a3a36dc550 100644 --- a/packages/client/ui-settings-plugin-inventory/package.json +++ b/packages/client/ui-settings-plugin-inventory/package.json @@ -68,6 +68,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-plugins/package.json b/packages/client/ui-settings-plugins/package.json index 687937052d..def5c9a3be 100644 --- a/packages/client/ui-settings-plugins/package.json +++ b/packages/client/ui-settings-plugins/package.json @@ -57,6 +57,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-session-log/package.json b/packages/client/ui-settings-session-log/package.json index 73b71ddddf..87ce57d76d 100644 --- a/packages/client/ui-settings-session-log/package.json +++ b/packages/client/ui-settings-session-log/package.json @@ -62,6 +62,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-shell/package.json b/packages/client/ui-settings-shell/package.json index aba5e94ecb..cacc9935b5 100644 --- a/packages/client/ui-settings-shell/package.json +++ b/packages/client/ui-settings-shell/package.json @@ -61,6 +61,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-subagent/package.json b/packages/client/ui-settings-subagent/package.json index 15b1a3c313..0e0c728546 100644 --- a/packages/client/ui-settings-subagent/package.json +++ b/packages/client/ui-settings-subagent/package.json @@ -62,6 +62,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings-web-search/package.json b/packages/client/ui-settings-web-search/package.json index 22ace4a429..1ca9a3b4be 100644 --- a/packages/client/ui-settings-web-search/package.json +++ b/packages/client/ui-settings-web-search/package.json @@ -63,6 +63,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-settings/package.json b/packages/client/ui-settings/package.json index 234c014989..1b9b299d5c 100644 --- a/packages/client/ui-settings/package.json +++ b/packages/client/ui-settings/package.json @@ -56,7 +56,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/schemastery": "workspace:~" diff --git a/packages/client/ui-shortcuts/package.json b/packages/client/ui-shortcuts/package.json index 252e6ccdbc..2de1bc435b 100644 --- a/packages/client/ui-shortcuts/package.json +++ b/packages/client/ui-shortcuts/package.json @@ -64,6 +64,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-sidebar-browser/package.json b/packages/client/ui-sidebar-browser/package.json index b806dd645c..ee0979c3ea 100644 --- a/packages/client/ui-sidebar-browser/package.json +++ b/packages/client/ui-sidebar-browser/package.json @@ -68,6 +68,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-sidebar-documentpreview/package.json b/packages/client/ui-sidebar-documentpreview/package.json index 9c30b4081a..4824c20d60 100644 --- a/packages/client/ui-sidebar-documentpreview/package.json +++ b/packages/client/ui-sidebar-documentpreview/package.json @@ -96,7 +96,10 @@ "lib/index.js", "lib/client.js", "lib/client.*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/schemastery": "workspace:~" diff --git a/packages/client/ui-sidebar-documentpreview/tests/document-preview-license-bundle.client.spec.ts b/packages/client/ui-sidebar-documentpreview/tests/document-preview-license-bundle.client.spec.ts index d42317f4b8..4561fcf543 100644 --- a/packages/client/ui-sidebar-documentpreview/tests/document-preview-license-bundle.client.spec.ts +++ b/packages/client/ui-sidebar-documentpreview/tests/document-preview-license-bundle.client.spec.ts @@ -58,16 +58,16 @@ describe('published document preview licenses', () => { const client = run('tar', ['-xOf', resolve(packageRoot, packed.filename), 'package/lib/client.js'], packageRoot, task.timeout) const pdf = run('tar', ['-xOf', resolve(packageRoot, packed.filename), 'package/lib/client.pdf.js'], packageRoot, task.timeout) - expect([...client.matchAll(/require\.async\("(\.\/client[^"/]*\.js)"\)/gu)].map(match => match[1])) + expect([...client.matchAll(/require\.async\((["'`])(\.\/client[^"'`/]*\.js)\1\)/gu)].map(match => match[2])) .toEqual(['./client.frontmatter-fields.js', './client.pdf.js', './client.excel.js']) - expect(client).not.toMatch(/\brequire\("\.\/client[^"/]*\.js"\)/u) - expect([...pdf.matchAll(/require\("(\.\/client[^"/]*\.js)"\)/gu)].map(match => match[1])) + expect(client).not.toMatch(/\brequire\((["'`])\.\/client[^"'`/]*\.js\1\)/u) + expect([...pdf.matchAll(/require\((["'`])(\.\/client[^"'`/]*\.js)\1\)/gu)].map(match => match[2])) .toEqual([]) expect(client).not.toContain('//! Bundled PDF.js license notices') expect(client).not.toContain('/pdfjs-dist/') expect(pdf).toContain('//! Bundled PDF.js license notices') const excel = run('tar', ['-xOf', resolve(packageRoot, packed.filename), 'package/lib/client.excel.js'], packageRoot, task.timeout) - expect(excel).not.toMatch(/\brequire\("\.\/client[^"/]*\.js"\)/u) + expect(excel).not.toMatch(/\brequire\((["'`])\.\/client[^"'`/]*\.js\1\)/u) expect(client).not.toContain('FortuneSheet') expect(excel).toContain('//! Bundled spreadsheet license notices') expect(excel).toContain('Copyright (c) 2022 Suzhou Ruilisi Technology Co., Ltd') @@ -78,7 +78,7 @@ describe('published document preview licenses', () => { expect(excel).toContain(license.split('\n').map(line => `// ${line}`).join('\n')) } const frontmatter = run('tar', ['-xOf', resolve(packageRoot, packed.filename), 'package/lib/client.frontmatter-fields.js'], packageRoot, task.timeout) - expect(frontmatter).not.toMatch(/\brequire\("\.\/client[^"/]*\.js"\)/u) + expect(frontmatter).not.toMatch(/\brequire\((["'`])\.\/client[^"'`/]*\.js\1\)/u) let frontmatterInitialized = false runInNewContext(frontmatter, { window: { __ModuleLoader__: { load: (registration: { factory: (resolve: (specifier: string) => unknown) => { FrontmatterFields: unknown } diff --git a/packages/client/ui-sidebar-files/package.json b/packages/client/ui-sidebar-files/package.json index 16f2319605..371267467a 100644 --- a/packages/client/ui-sidebar-files/package.json +++ b/packages/client/ui-sidebar-files/package.json @@ -74,6 +74,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-sidebar-right/package.json b/packages/client/ui-sidebar-right/package.json index e159eec601..23fb7b79fc 100644 --- a/packages/client/ui-sidebar-right/package.json +++ b/packages/client/ui-sidebar-right/package.json @@ -79,6 +79,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-sidebar-terminal/package.json b/packages/client/ui-sidebar-terminal/package.json index d02ec0d9c5..82dd31cc04 100644 --- a/packages/client/ui-sidebar-terminal/package.json +++ b/packages/client/ui-sidebar-terminal/package.json @@ -76,6 +76,9 @@ "lib/index.js", "lib/client.js", "lib/client.*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-sidebar-terminal/tests/bundle-split.client.spec.ts b/packages/client/ui-sidebar-terminal/tests/bundle-split.client.spec.ts index c42abde2e6..e3832368dd 100644 --- a/packages/client/ui-sidebar-terminal/tests/bundle-split.client.spec.ts +++ b/packages/client/ui-sidebar-terminal/tests/bundle-split.client.spec.ts @@ -11,12 +11,14 @@ describe('terminal client artifacts', () => { expect(existsSync(terminalPath)).toBe(true) const entry = readFileSync(entryPath, 'utf8') const terminal = readFileSync(terminalPath, 'utf8') - expect([...entry.matchAll(/require\.async\("(\.\/client[^"/]*\.js)"\)/gu)].map(match => match[1])) + expect([...entry.matchAll(/require\.async\((["'`])(\.\/client[^"'`/]*\.js)\1\)/gu)].map(match => match[2])) .toEqual(['./client.terminal.js']) - expect(entry).not.toMatch(/\brequire\("\.\/client[^"/]*\.js"\)/u) - expect([...terminal.matchAll(/require\("(\.\/client[^"/]*\.js)"\)/gu)].map(match => match[1])) + expect(entry).not.toMatch(/\brequire\((["'`])\.\/client[^"'`/]*\.js\1\)/u) + expect([...terminal.matchAll(/require\((["'`])(\.\/client[^"'`/]*\.js)\1\)/gu)].map(match => match[2])) .toEqual([]) - expect(entry).not.toContain('/@xterm+xterm@') - expect(terminal).toContain('/@xterm+xterm@') + // Minification drops the module-path comments, so the maps name the bundled inputs. + const sources = (path: string): string[] => (JSON.parse(readFileSync(`${path}.map`, 'utf8')) as { sources: string[] }).sources + expect(sources(entryPath).some(source => source.includes('/@xterm+xterm@'))).toBe(false) + expect(sources(terminalPath).some(source => source.includes('/@xterm+xterm@'))).toBe(true) }) }) diff --git a/packages/client/ui-sidebar/package.json b/packages/client/ui-sidebar/package.json index 566ebce322..25fdb3d76b 100644 --- a/packages/client/ui-sidebar/package.json +++ b/packages/client/ui-sidebar/package.json @@ -69,6 +69,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-skill/package.json b/packages/client/ui-skill/package.json index 0bb24c40ea..bec902998b 100644 --- a/packages/client/ui-skill/package.json +++ b/packages/client/ui-skill/package.json @@ -75,6 +75,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-slots/package.json b/packages/client/ui-slots/package.json index 4a43009df6..8220bc664f 100644 --- a/packages/client/ui-slots/package.json +++ b/packages/client/ui-slots/package.json @@ -29,7 +29,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~" diff --git a/packages/client/ui-subagent/package.json b/packages/client/ui-subagent/package.json index 51ea627f7f..ade2634518 100644 --- a/packages/client/ui-subagent/package.json +++ b/packages/client/ui-subagent/package.json @@ -77,6 +77,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-theme/package.json b/packages/client/ui-theme/package.json index a11e34c7e9..b40ea1cdcf 100644 --- a/packages/client/ui-theme/package.json +++ b/packages/client/ui-theme/package.json @@ -67,7 +67,10 @@ "lib/index.js", "lib/client.js", "lib/styles", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "scripts": { "bundle": "tsdown", diff --git a/packages/client/ui-tool/package.json b/packages/client/ui-tool/package.json index 1557bf71d8..5e30dc91b5 100644 --- a/packages/client/ui-tool/package.json +++ b/packages/client/ui-tool/package.json @@ -90,6 +90,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-trajectory/package.json b/packages/client/ui-trajectory/package.json index 0a4541381a..30cc536266 100644 --- a/packages/client/ui-trajectory/package.json +++ b/packages/client/ui-trajectory/package.json @@ -88,10 +88,14 @@ "lib/index.js", "lib/client.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "dependencies": { "@deepseek-ai/dsh-typert-protocol": "workspace:*", diff --git a/packages/client/ui-user-questions/package.json b/packages/client/ui-user-questions/package.json index 2c9675948b..7dedfd4a26 100644 --- a/packages/client/ui-user-questions/package.json +++ b/packages/client/ui-user-questions/package.json @@ -79,6 +79,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/ui-workflow-run/package.json b/packages/client/ui-workflow-run/package.json index f83e3dc738..812639e8c0 100644 --- a/packages/client/ui-workflow-run/package.json +++ b/packages/client/ui-workflow-run/package.json @@ -48,7 +48,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/client/ui-workspace/package.json b/packages/client/ui-workspace/package.json index 999c19eb72..f495f14fb7 100644 --- a/packages/client/ui-workspace/package.json +++ b/packages/client/ui-workspace/package.json @@ -90,6 +90,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/client/web/package.json b/packages/client/web/package.json index 4fb4f4e0c1..9680069d29 100644 --- a/packages/client/web/package.json +++ b/packages/client/web/package.json @@ -49,6 +49,9 @@ "lib/index.js", "lib/**/*.css", "lib/apply-injections.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/compaction/command-compact/package.json b/packages/compaction/command-compact/package.json index 4b55489bd8..957921e87a 100644 --- a/packages/compaction/command-compact/package.json +++ b/packages/compaction/command-compact/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/compaction/compaction-basic/package.json b/packages/compaction/compaction-basic/package.json index 01e99f621a..80d9f30987 100644 --- a/packages/compaction/compaction-basic/package.json +++ b/packages/compaction/compaction-basic/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/compaction/compaction-image-offload/package.json b/packages/compaction/compaction-image-offload/package.json index 2c9ebb27cf..0249347ffb 100644 --- a/packages/compaction/compaction-image-offload/package.json +++ b/packages/compaction/compaction-image-offload/package.json @@ -29,7 +29,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/compaction/compaction-tool-result-pruner/package.json b/packages/compaction/compaction-tool-result-pruner/package.json index 3b4b98611c..a6f78944fb 100644 --- a/packages/compaction/compaction-tool-result-pruner/package.json +++ b/packages/compaction/compaction-tool-result-pruner/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/compaction/compaction/package.json b/packages/compaction/compaction/package.json index 93b172c075..113a5a257c 100644 --- a/packages/compaction/compaction/package.json +++ b/packages/compaction/compaction/package.json @@ -32,7 +32,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/computer-use/computer-use/package.json b/packages/computer-use/computer-use/package.json index 38afcc55c7..0f7f00eb31 100644 --- a/packages/computer-use/computer-use/package.json +++ b/packages/computer-use/computer-use/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/context/agent-instructions/package.json b/packages/context/agent-instructions/package.json index 21adadf94f..dd95de6641 100644 --- a/packages/context/agent-instructions/package.json +++ b/packages/context/agent-instructions/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/context/file-reference-local/package.json b/packages/context/file-reference-local/package.json index 25dcd59301..72d0bc3d0f 100644 --- a/packages/context/file-reference-local/package.json +++ b/packages/context/file-reference-local/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/context/file-reference/package.json b/packages/context/file-reference/package.json index a537be2635..30f4217c8e 100644 --- a/packages/context/file-reference/package.json +++ b/packages/context/file-reference/package.json @@ -32,7 +32,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/context/harness-dev-context/package.json b/packages/context/harness-dev-context/package.json index 343bcc77d1..5af889019d 100644 --- a/packages/context/harness-dev-context/package.json +++ b/packages/context/harness-dev-context/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/context/session-reference/package.json b/packages/context/session-reference/package.json index c7047b1740..7ba212f147 100644 --- a/packages/context/session-reference/package.json +++ b/packages/context/session-reference/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/context/time-context/package.json b/packages/context/time-context/package.json index 62ac6fb8bd..2ace73c0b7 100644 --- a/packages/context/time-context/package.json +++ b/packages/context/time-context/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/context/tmux-context/package.json b/packages/context/tmux-context/package.json index 0706a9674d..e37a47b08b 100644 --- a/packages/context/tmux-context/package.json +++ b/packages/context/tmux-context/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/core/agent-default-model/package.json b/packages/core/agent-default-model/package.json index dac9264197..1366189505 100644 --- a/packages/core/agent-default-model/package.json +++ b/packages/core/agent-default-model/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/core/agent-loop/package.json b/packages/core/agent-loop/package.json index ef26563b6f..984b24167a 100644 --- a/packages/core/agent-loop/package.json +++ b/packages/core/agent-loop/package.json @@ -24,7 +24,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/core/agent-tool-presentation/package.json b/packages/core/agent-tool-presentation/package.json index 6416f27fb0..53cc5041c7 100644 --- a/packages/core/agent-tool-presentation/package.json +++ b/packages/core/agent-tool-presentation/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/core/agent/package.json b/packages/core/agent/package.json index 769ec73bfa..1138bed9bd 100644 --- a/packages/core/agent/package.json +++ b/packages/core/agent/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/core/scope/package.json b/packages/core/scope/package.json index 058a9bde65..73e41943b3 100644 --- a/packages/core/scope/package.json +++ b/packages/core/scope/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/core/session/package.json b/packages/core/session/package.json index 3c19de4e7a..0800cab3c2 100644 --- a/packages/core/session/package.json +++ b/packages/core/session/package.json @@ -38,7 +38,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/core/system-prompt/package.json b/packages/core/system-prompt/package.json index 92b90d2544..d5cb602afa 100644 --- a/packages/core/system-prompt/package.json +++ b/packages/core/system-prompt/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/core/tool-executor-native/package.json b/packages/core/tool-executor-native/package.json index 183f53ee8e..184dc63a1d 100644 --- a/packages/core/tool-executor-native/package.json +++ b/packages/core/tool-executor-native/package.json @@ -26,7 +26,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~", diff --git a/packages/core/tool-executor-ptc/package.json b/packages/core/tool-executor-ptc/package.json index 2751535e18..16c9c14acb 100644 --- a/packages/core/tool-executor-ptc/package.json +++ b/packages/core/tool-executor-ptc/package.json @@ -35,7 +35,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~", diff --git a/packages/core/tools/package.json b/packages/core/tools/package.json index 23c4eb3f38..dde6ef26a5 100644 --- a/packages/core/tools/package.json +++ b/packages/core/tools/package.json @@ -36,7 +36,10 @@ "lib/pipeline.js", "lib/shared-*.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/credentials/authorization/package.json b/packages/credentials/authorization/package.json index 24f1c1c1ca..8a9da04f8f 100644 --- a/packages/credentials/authorization/package.json +++ b/packages/credentials/authorization/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/credentials/credentials-local/package.json b/packages/credentials/credentials-local/package.json index f4b71875e2..2c1f4258b9 100644 --- a/packages/credentials/credentials-local/package.json +++ b/packages/credentials/credentials-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/credentials/credentials/package.json b/packages/credentials/credentials/package.json index b1acc9e624..4589152305 100644 --- a/packages/credentials/credentials/package.json +++ b/packages/credentials/credentials/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/credentials/deepseek-account-platform/package.json b/packages/credentials/deepseek-account-platform/package.json index a4196ebff3..69b5fb4228 100644 --- a/packages/credentials/deepseek-account-platform/package.json +++ b/packages/credentials/deepseek-account-platform/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/credentials/deepseek-account/package.json b/packages/credentials/deepseek-account/package.json index 1e0f4296c1..2a4d649a9f 100644 --- a/packages/credentials/deepseek-account/package.json +++ b/packages/credentials/deepseek-account/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/deliverables/deliverable-file-references/package.json b/packages/deliverables/deliverable-file-references/package.json index 54f3815c21..c391c2aafc 100644 --- a/packages/deliverables/deliverable-file-references/package.json +++ b/packages/deliverables/deliverable-file-references/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/deliverables/tool-present/package.json b/packages/deliverables/tool-present/package.json index c080cd6e05..241765b9ff 100644 --- a/packages/deliverables/tool-present/package.json +++ b/packages/deliverables/tool-present/package.json @@ -31,7 +31,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/schemastery": "workspace:~" diff --git a/packages/deliverables/workspace-changes/package.json b/packages/deliverables/workspace-changes/package.json index c8e00ff133..f75792f80b 100644 --- a/packages/deliverables/workspace-changes/package.json +++ b/packages/deliverables/workspace-changes/package.json @@ -31,7 +31,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/schemastery": "workspace:~", diff --git a/packages/document/office-kit/package.json b/packages/document/office-kit/package.json index ef5ee0cbf8..98ca669f49 100644 --- a/packages/document/office-kit/package.json +++ b/packages/document/office-kit/package.json @@ -40,10 +40,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "peerDependencies": { "@deepseek-ai/cordis": "workspace:~" diff --git a/packages/document/tool-office/package.json b/packages/document/tool-office/package.json index e92bb8afef..52aeb942e4 100644 --- a/packages/document/tool-office/package.json +++ b/packages/document/tool-office/package.json @@ -26,7 +26,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "dependencies": { "@deepseek-ai/schemastery": "workspace:~" diff --git a/packages/experimental/action-cards/package.json b/packages/experimental/action-cards/package.json index ccb6f814f4..e54347d2d0 100644 --- a/packages/experimental/action-cards/package.json +++ b/packages/experimental/action-cards/package.json @@ -67,9 +67,13 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ] } diff --git a/packages/experimental/api-speech-to-text/package.json b/packages/experimental/api-speech-to-text/package.json index 52f9e6cf55..5d80d968e6 100644 --- a/packages/experimental/api-speech-to-text/package.json +++ b/packages/experimental/api-speech-to-text/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/auto-review/package.json b/packages/experimental/auto-review/package.json index 3a96c100aa..93d2e4e982 100644 --- a/packages/experimental/auto-review/package.json +++ b/packages/experimental/auto-review/package.json @@ -27,7 +27,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/badge-skill-bundle/package.json b/packages/experimental/badge-skill-bundle/package.json index d076b6f76f..78b7cc2887 100644 --- a/packages/experimental/badge-skill-bundle/package.json +++ b/packages/experimental/badge-skill-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/experimental/browser-use-chrome-devtools-mcp/package.json b/packages/experimental/browser-use-chrome-devtools-mcp/package.json index 6230c69436..e0aeb645cb 100644 --- a/packages/experimental/browser-use-chrome-devtools-mcp/package.json +++ b/packages/experimental/browser-use-chrome-devtools-mcp/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/browser-use-playwright-mcp/package.json b/packages/experimental/browser-use-playwright-mcp/package.json index c1836980d3..f710257744 100644 --- a/packages/experimental/browser-use-playwright-mcp/package.json +++ b/packages/experimental/browser-use-playwright-mcp/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/browser-use-runtime/package.json b/packages/experimental/browser-use-runtime/package.json index 156c5c2999..24d0d467ed 100644 --- a/packages/experimental/browser-use-runtime/package.json +++ b/packages/experimental/browser-use-runtime/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/browser-use-stagehand-native/package.json b/packages/experimental/browser-use-stagehand-native/package.json index 691223030f..0e3588735e 100644 --- a/packages/experimental/browser-use-stagehand-native/package.json +++ b/packages/experimental/browser-use-stagehand-native/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/worker.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/claude-code-mods/package.json b/packages/experimental/claude-code-mods/package.json index bd29e5ab60..77b4571bfe 100644 --- a/packages/experimental/claude-code-mods/package.json +++ b/packages/experimental/claude-code-mods/package.json @@ -44,10 +44,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/client-ui-action-cards/package.json b/packages/experimental/client-ui-action-cards/package.json index fb8554e0ff..db4fe08b24 100644 --- a/packages/experimental/client-ui-action-cards/package.json +++ b/packages/experimental/client-ui-action-cards/package.json @@ -66,6 +66,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/experimental/client-ui-claude-code-mods/package.json b/packages/experimental/client-ui-claude-code-mods/package.json index b6ba0ebc7e..a1cf702e44 100644 --- a/packages/experimental/client-ui-claude-code-mods/package.json +++ b/packages/experimental/client-ui-claude-code-mods/package.json @@ -46,7 +46,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/client-ui-cot-translation/package.json b/packages/experimental/client-ui-cot-translation/package.json index 80f5b44981..e2de0ff4e6 100644 --- a/packages/experimental/client-ui-cot-translation/package.json +++ b/packages/experimental/client-ui-cot-translation/package.json @@ -93,9 +93,13 @@ "lib/index.js", "lib/client.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ] } diff --git a/packages/experimental/client-ui-creation-recommendations/package.json b/packages/experimental/client-ui-creation-recommendations/package.json index de281ac1de..31cfadc132 100644 --- a/packages/experimental/client-ui-creation-recommendations/package.json +++ b/packages/experimental/client-ui-creation-recommendations/package.json @@ -59,6 +59,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/experimental/client-ui-forge/package.json b/packages/experimental/client-ui-forge/package.json index 898e0fa5e3..4133c97e52 100644 --- a/packages/experimental/client-ui-forge/package.json +++ b/packages/experimental/client-ui-forge/package.json @@ -118,9 +118,13 @@ "lib/index.js", "lib/client.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ] } diff --git a/packages/experimental/client-ui-plugin-recommendations/package.json b/packages/experimental/client-ui-plugin-recommendations/package.json index fc88e08992..cdd2975bed 100644 --- a/packages/experimental/client-ui-plugin-recommendations/package.json +++ b/packages/experimental/client-ui-plugin-recommendations/package.json @@ -64,6 +64,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/experimental/client-ui-stats/package.json b/packages/experimental/client-ui-stats/package.json index b6252b9d33..e252fc1a53 100644 --- a/packages/experimental/client-ui-stats/package.json +++ b/packages/experimental/client-ui-stats/package.json @@ -75,6 +75,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/experimental/client-ui-voice-input/package.json b/packages/experimental/client-ui-voice-input/package.json index 20b4649e56..0ccce22c3d 100644 --- a/packages/experimental/client-ui-voice-input/package.json +++ b/packages/experimental/client-ui-voice-input/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": {}, diff --git a/packages/experimental/computer-use-cua-driver-mcp/package.json b/packages/experimental/computer-use-cua-driver-mcp/package.json index 4b52a40a75..35c5682420 100644 --- a/packages/experimental/computer-use-cua-driver-mcp/package.json +++ b/packages/experimental/computer-use-cua-driver-mcp/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/computer-use-cua-driver-native/package.json b/packages/experimental/computer-use-cua-driver-native/package.json index a59ff6c111..d2a48733ec 100644 --- a/packages/experimental/computer-use-cua-driver-native/package.json +++ b/packages/experimental/computer-use-cua-driver-native/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/cot-translation-bundle/package.json b/packages/experimental/cot-translation-bundle/package.json index 0d25f350f8..4fa466c0cd 100644 --- a/packages/experimental/cot-translation-bundle/package.json +++ b/packages/experimental/cot-translation-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/creation-recommendations/package.json b/packages/experimental/creation-recommendations/package.json index 28ee08a9c9..e7aa9bc456 100644 --- a/packages/experimental/creation-recommendations/package.json +++ b/packages/experimental/creation-recommendations/package.json @@ -66,7 +66,10 @@ "references/*.md", "skills/*.md", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "icon": "./icon.svg" } diff --git a/packages/experimental/cua-bundle/package.json b/packages/experimental/cua-bundle/package.json index d8ec99da71..f9ba508721 100644 --- a/packages/experimental/cua-bundle/package.json +++ b/packages/experimental/cua-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/experimental/cua-macos/package.json b/packages/experimental/cua-macos/package.json index 5a3898628c..a77e27886b 100644 --- a/packages/experimental/cua-macos/package.json +++ b/packages/experimental/cua-macos/package.json @@ -40,7 +40,10 @@ "native/README.md", "native/README.zh.md", "native/protocol.schema.json", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/cua/package.json b/packages/experimental/cua/package.json index 63cd6a0942..625a8c0e00 100644 --- a/packages/experimental/cua/package.json +++ b/packages/experimental/cua/package.json @@ -64,10 +64,14 @@ "lib/native-client.js", "lib/protocol.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/forge-bundle/package.json b/packages/experimental/forge-bundle/package.json index 99ce7f4261..6643eca40e 100644 --- a/packages/experimental/forge-bundle/package.json +++ b/packages/experimental/forge-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/forge-github/package.json b/packages/experimental/forge-github/package.json index 1b71b94c36..bf31945ec1 100644 --- a/packages/experimental/forge-github/package.json +++ b/packages/experimental/forge-github/package.json @@ -20,7 +20,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "repository": { diff --git a/packages/experimental/forge-session/package.json b/packages/experimental/forge-session/package.json index f8182a86f8..9f7a6b4f81 100644 --- a/packages/experimental/forge-session/package.json +++ b/packages/experimental/forge-session/package.json @@ -23,7 +23,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "repository": { diff --git a/packages/experimental/forge/package.json b/packages/experimental/forge/package.json index 66b2f3784c..5668893b59 100644 --- a/packages/experimental/forge/package.json +++ b/packages/experimental/forge/package.json @@ -23,7 +23,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "repository": { diff --git a/packages/experimental/hook-protocol/package.json b/packages/experimental/hook-protocol/package.json index 2bf5246053..62842d2c8a 100644 --- a/packages/experimental/hook-protocol/package.json +++ b/packages/experimental/hook-protocol/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/hooks-claude-code/package.json b/packages/experimental/hooks-claude-code/package.json index acefeb2708..fdd0305fae 100644 --- a/packages/experimental/hooks-claude-code/package.json +++ b/packages/experimental/hooks-claude-code/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/hooks-codex/package.json b/packages/experimental/hooks-codex/package.json index fb9965e05f..5dd70c5453 100644 --- a/packages/experimental/hooks-codex/package.json +++ b/packages/experimental/hooks-codex/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/inspector-profile/package.json b/packages/experimental/inspector-profile/package.json index 5c520b7d77..95e55e3658 100644 --- a/packages/experimental/inspector-profile/package.json +++ b/packages/experimental/inspector-profile/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/experimental/inspector/package.json b/packages/experimental/inspector/package.json index dbd4576522..acf864caf5 100644 --- a/packages/experimental/inspector/package.json +++ b/packages/experimental/inspector/package.json @@ -42,7 +42,10 @@ "lib/client.*.js", "lib/worker.js", "lib/devtools/**", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/liveshare-protocol/package.json b/packages/experimental/liveshare-protocol/package.json index 4664d3fa43..9805051980 100644 --- a/packages/experimental/liveshare-protocol/package.json +++ b/packages/experimental/liveshare-protocol/package.json @@ -19,7 +19,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/liveshare/package.json b/packages/experimental/liveshare/package.json index 22f96851e3..5691e75c9f 100644 --- a/packages/experimental/liveshare/package.json +++ b/packages/experimental/liveshare/package.json @@ -45,10 +45,14 @@ "lib/owner-gateway/cli.js", "lib/retry-backoff-*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "scripts": { "bundle": "tsdown", diff --git a/packages/experimental/personalized-recommendations/package.json b/packages/experimental/personalized-recommendations/package.json index acd6a0e027..ca401678cc 100644 --- a/packages/experimental/personalized-recommendations/package.json +++ b/packages/experimental/personalized-recommendations/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/plugin-market-bundle/package.json b/packages/experimental/plugin-market-bundle/package.json index 5fd4f5c255..ac117978aa 100644 --- a/packages/experimental/plugin-market-bundle/package.json +++ b/packages/experimental/plugin-market-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/plugin-recommendations/package.json b/packages/experimental/plugin-recommendations/package.json index 73e68f91d7..801a58f359 100644 --- a/packages/experimental/plugin-recommendations/package.json +++ b/packages/experimental/plugin-recommendations/package.json @@ -66,10 +66,14 @@ "skills/*.md", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "icon": "./icon.svg" } diff --git a/packages/experimental/ptc-runtime-python/package.json b/packages/experimental/ptc-runtime-python/package.json index edc37fee2f..465065dca3 100644 --- a/packages/experimental/ptc-runtime-python/package.json +++ b/packages/experimental/ptc-runtime-python/package.json @@ -22,7 +22,10 @@ "locale/*.json", "lib/index.js", "py/**/*.py", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/ralph-bundle/package.json b/packages/experimental/ralph-bundle/package.json index a7426ad8bc..f648a1a436 100644 --- a/packages/experimental/ralph-bundle/package.json +++ b/packages/experimental/ralph-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/experimental/session-inspector/package.json b/packages/experimental/session-inspector/package.json index 7557b9ad33..4761c8b36d 100644 --- a/packages/experimental/session-inspector/package.json +++ b/packages/experimental/session-inspector/package.json @@ -42,7 +42,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "scripts": { "bundle": "tsdown", diff --git a/packages/experimental/session-search/package.json b/packages/experimental/session-search/package.json index 7d9ff57e01..4a5df69bc9 100644 --- a/packages/experimental/session-search/package.json +++ b/packages/experimental/session-search/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/experimental/session-title-all-prompts-llm/package.json b/packages/experimental/session-title-all-prompts-llm/package.json index 61c230299d..bf0e439800 100644 --- a/packages/experimental/session-title-all-prompts-llm/package.json +++ b/packages/experimental/session-title-all-prompts-llm/package.json @@ -21,7 +21,7 @@ "./locale/*.json": "./locale/*.json", "./package.json": "./package.json" }, - "files": ["locale/*.json", "lib/index.js", "lib/types/**/*.d.ts"], + "files": ["locale/*.json", "lib/index.js", "lib/types/**/*.d.ts", "lib/types/**/*.d.ts.map", "lib/**/*.js.map", "src"], "license": "MIT", "peerDependencies": { "@deepseek-ai/dsh-llm": "workspace:*", diff --git a/packages/experimental/session-titles-bundle/package.json b/packages/experimental/session-titles-bundle/package.json index c5b02c7166..b1d21c42ca 100644 --- a/packages/experimental/session-titles-bundle/package.json +++ b/packages/experimental/session-titles-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/experimental/skill-badge/package.json b/packages/experimental/skill-badge/package.json index 9bc0863fbb..c31ca76cec 100644 --- a/packages/experimental/skill-badge/package.json +++ b/packages/experimental/skill-badge/package.json @@ -27,7 +27,10 @@ "locale/*.json", "lib/index.js", "assets", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/speech-to-text-sensevoice/package.json b/packages/experimental/speech-to-text-sensevoice/package.json index 2ecf5298f4..e0ceeb6594 100644 --- a/packages/experimental/speech-to-text-sensevoice/package.json +++ b/packages/experimental/speech-to-text-sensevoice/package.json @@ -31,7 +31,10 @@ "lib/index.js", "lib/worker.js", "runtime/assets.json", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/speech-to-text/package.json b/packages/experimental/speech-to-text/package.json index 42ca193e04..fa85211202 100644 --- a/packages/experimental/speech-to-text/package.json +++ b/packages/experimental/speech-to-text/package.json @@ -34,7 +34,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/subagent-oar/package.json b/packages/experimental/subagent-oar/package.json index b4c030e13c..2df967de2e 100644 --- a/packages/experimental/subagent-oar/package.json +++ b/packages/experimental/subagent-oar/package.json @@ -27,7 +27,10 @@ "locale/*.json", "lib/index.js", "LICENSE-OAR", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "icon": "./icon.svg", diff --git a/packages/experimental/terminal-bundle/package.json b/packages/experimental/terminal-bundle/package.json index 24ed288b6b..0b8ab1bd86 100644 --- a/packages/experimental/terminal-bundle/package.json +++ b/packages/experimental/terminal-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/experimental/tool-ralph/package.json b/packages/experimental/tool-ralph/package.json index 35410ce857..3c0e7e9d78 100644 --- a/packages/experimental/tool-ralph/package.json +++ b/packages/experimental/tool-ralph/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/tool-session-query/package.json b/packages/experimental/tool-session-query/package.json index 88eeac29c4..87ba139025 100644 --- a/packages/experimental/tool-session-query/package.json +++ b/packages/experimental/tool-session-query/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/tool-subagent-oar/package.json b/packages/experimental/tool-subagent-oar/package.json index 9100e71971..dbf629916a 100644 --- a/packages/experimental/tool-subagent-oar/package.json +++ b/packages/experimental/tool-subagent-oar/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/tool-terminal/package.json b/packages/experimental/tool-terminal/package.json index 14581ab928..fabe723ad9 100644 --- a/packages/experimental/tool-terminal/package.json +++ b/packages/experimental/tool-terminal/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/tool-worktree/package.json b/packages/experimental/tool-worktree/package.json index 8966c0f98f..ead16caa68 100644 --- a/packages/experimental/tool-worktree/package.json +++ b/packages/experimental/tool-worktree/package.json @@ -24,7 +24,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "repository": { diff --git a/packages/experimental/translator/package.json b/packages/experimental/translator/package.json index 066344dad8..ddce9ac03b 100644 --- a/packages/experimental/translator/package.json +++ b/packages/experimental/translator/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/voice-input-bundle/package.json b/packages/experimental/voice-input-bundle/package.json index ba00f6afa8..5236668eba 100644 --- a/packages/experimental/voice-input-bundle/package.json +++ b/packages/experimental/voice-input-bundle/package.json @@ -30,7 +30,10 @@ "docs", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/webhook-github/package.json b/packages/experimental/webhook-github/package.json index d687870fb6..fee4f205be 100644 --- a/packages/experimental/webhook-github/package.json +++ b/packages/experimental/webhook-github/package.json @@ -33,7 +33,10 @@ "examples/github-review/cordis.yml", "examples/github-review/github-ready-review-rule.mjs", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/webhook/package.json b/packages/experimental/webhook/package.json index 60b3e0e6e6..6d32609aaf 100644 --- a/packages/experimental/webhook/package.json +++ b/packages/experimental/webhook/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/experimental/webworker-packer/package.json b/packages/experimental/webworker-packer/package.json index 939f5f10ae..9413f261c2 100644 --- a/packages/experimental/webworker-packer/package.json +++ b/packages/experimental/webworker-packer/package.json @@ -29,7 +29,10 @@ "lib/bin.js", "bin.js", "lib/repository-*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/experimental/webworker-packer/src/pack.ts b/packages/experimental/webworker-packer/src/pack.ts index fd394d2d51..f92270d584 100644 --- a/packages/experimental/webworker-packer/src/pack.ts +++ b/packages/experimental/webworker-packer/src/pack.ts @@ -582,8 +582,9 @@ function materialize( /** * Request form the dynamic Client build emits for a package-local chunk: a * literal `require.async("./client..js")`, served by the Host on demand. + * The minifier may print the literal with any quote, including a template without substitutions. */ -const CHUNK_REQUEST = /\brequire\.async\(\s*(["'])(\.\/client\.[A-Za-z0-9][A-Za-z0-9._-]*\.js)\1\s*\)/g +const CHUNK_REQUEST = /\brequire\.async\(\s*(["'`])(\.\/client\.[A-Za-z0-9][A-Za-z0-9._-]*\.js)\1\s*\)/g /** * Image paths every materialized package's `./client` export names, under any diff --git a/packages/experimental/webworker-packer/tests/built-lib.e2e.ts b/packages/experimental/webworker-packer/tests/built-lib.e2e.ts index f7fc2cfe11..ef678f0d49 100644 --- a/packages/experimental/webworker-packer/tests/built-lib.e2e.ts +++ b/packages/experimental/webworker-packer/tests/built-lib.e2e.ts @@ -1,4 +1,4 @@ -/** Installed packer/runtime interoperability without either package's source tree. */ +/** Installed packer/runtime interoperability from published tarballs, without a workspace checkout. */ import { existsSync } from 'node:fs' import { mkdir, mkdtemp, readFile, readdir, realpath, rm, symlink, unlink, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' @@ -54,7 +54,8 @@ it('loads both tarballs through plain Node and mounts their base image and overl const archives = (await readdir(packRoot)).filter(file => file.endsWith('.tgz')) expect(archives).toHaveLength(1) await run('tar', ['-xzf', join(packRoot, archives[0]!), '-C', directory, '--strip-components=1'], root) - expect(existsSync(join(directory, 'src'))).toBe(false) + // The published payload carries the source tree; the consumer below resolves and runs `lib` alone. + expect(existsSync(join(directory, 'src'))).toBe(true) const manifest = JSON.parse(await readFile(join(directory, 'package.json'), 'utf8')) as { dependencies?: Record peerDependencies?: Record diff --git a/packages/experimental/webworker-packer/tests/lazy-chunks.spec.ts b/packages/experimental/webworker-packer/tests/lazy-chunks.spec.ts index d910d9768f..824da7c1b0 100644 --- a/packages/experimental/webworker-packer/tests/lazy-chunks.spec.ts +++ b/packages/experimental/webworker-packer/tests/lazy-chunks.spec.ts @@ -40,8 +40,9 @@ function fixture(test: TestContext, files: Record): PackOptions const CHUNKS = { 'client.browser.js': 'module.exports = { load: () => require.async("./client.pdf.js") }', - 'client.pdf.js': 'module.exports = { worker: () => require.async(\'./client.pdf-worker.js\') }', + 'client.pdf.js': 'module.exports = { worker: () => require.async(\'./client.pdf-worker.js\'), minified: () => require.async(`./client.pdf-font.js`) }', 'client.pdf-worker.js': 'module.exports = "pdf worker"', + 'client.pdf-font.js': 'module.exports = "pdf font"', 'client.orphan.js': 'module.exports = "nobody asks for me"', } @@ -52,8 +53,10 @@ it('moves every require.async chunk into its own archive and registers it', (tes expect(base).toContain(`${PREFIX}/client.orphan.js`) expect(base).not.toContain(`${PREFIX}/client.pdf.js`) expect(base).not.toContain(`${PREFIX}/client.pdf-worker.js`) + expect(base).not.toContain(`${PREFIX}/client.pdf-font.js`) expect(result.lazyArchives.map(archive => archive.files)).toEqual([ + [`${PREFIX}/client.pdf-font.js`], [`${PREFIX}/client.pdf-worker.js`], [`${PREFIX}/client.pdf.js`], ]) diff --git a/packages/experimental/webworker-runtime/package.json b/packages/experimental/webworker-runtime/package.json index 877c402cc5..aee55410e2 100644 --- a/packages/experimental/webworker-runtime/package.json +++ b/packages/experimental/webworker-runtime/package.json @@ -74,6 +74,9 @@ "lib/index.js", "lib/worker.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/experimental/worktree/package.json b/packages/experimental/worktree/package.json index 007130c184..e5e398c795 100644 --- a/packages/experimental/worktree/package.json +++ b/packages/experimental/worktree/package.json @@ -20,7 +20,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "repository": { diff --git a/packages/extensions/cordis-client-runner/package.json b/packages/extensions/cordis-client-runner/package.json index 9308ff40da..c23b15cb50 100644 --- a/packages/extensions/cordis-client-runner/package.json +++ b/packages/extensions/cordis-client-runner/package.json @@ -60,6 +60,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/extensions/cordis-host-runner/package.json b/packages/extensions/cordis-host-runner/package.json index ef9b07230a..ef0e595c7a 100644 --- a/packages/extensions/cordis-host-runner/package.json +++ b/packages/extensions/cordis-host-runner/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/extensions/tool-cordis/package.json b/packages/extensions/tool-cordis/package.json index 8cdae93b83..bd9ac535f5 100644 --- a/packages/extensions/tool-cordis/package.json +++ b/packages/extensions/tool-cordis/package.json @@ -32,7 +32,10 @@ "locale/host/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/extensions/ui-cordis/package.json b/packages/extensions/ui-cordis/package.json index e2b37ce4ef..b5d881cd20 100644 --- a/packages/extensions/ui-cordis/package.json +++ b/packages/extensions/ui-cordis/package.json @@ -69,6 +69,9 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/feedback/command-feedback/package.json b/packages/feedback/command-feedback/package.json index 56658a928a..551b0cee9d 100644 --- a/packages/feedback/command-feedback/package.json +++ b/packages/feedback/command-feedback/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/feedback/message-feedback/package.json b/packages/feedback/message-feedback/package.json index 07c639a6fc..4cc28f568e 100644 --- a/packages/feedback/message-feedback/package.json +++ b/packages/feedback/message-feedback/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/fs/fs-local/package.json b/packages/fs/fs-local/package.json index c5bf079b21..5f03ee09e3 100644 --- a/packages/fs/fs-local/package.json +++ b/packages/fs/fs-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/fs/fs-observation-policy/package.json b/packages/fs/fs-observation-policy/package.json index 1715097c50..fdd60dac8d 100644 --- a/packages/fs/fs-observation-policy/package.json +++ b/packages/fs/fs-observation-policy/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/fs/fs-patch/package.json b/packages/fs/fs-patch/package.json index d766c3b09e..825305bda4 100644 --- a/packages/fs/fs-patch/package.json +++ b/packages/fs/fs-patch/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/fs/fs-sandbox/package.json b/packages/fs/fs-sandbox/package.json index 1bc6495751..8a75f09690 100644 --- a/packages/fs/fs-sandbox/package.json +++ b/packages/fs/fs-sandbox/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/fs/fs/package.json b/packages/fs/fs/package.json index 0e2ef2db9f..e13ffcaddc 100644 --- a/packages/fs/fs/package.json +++ b/packages/fs/fs/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/fs/tool-fs-search/package.json b/packages/fs/tool-fs-search/package.json index 345a12c62a..29e776f7a3 100644 --- a/packages/fs/tool-fs-search/package.json +++ b/packages/fs/tool-fs-search/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/fs/tool-fs/package.json b/packages/fs/tool-fs/package.json index fcdb3ef4bf..331615dce5 100644 --- a/packages/fs/tool-fs/package.json +++ b/packages/fs/tool-fs/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/fs/tool-str-replace-editor/package.json b/packages/fs/tool-str-replace-editor/package.json index 0383e9093d..291dc78beb 100644 --- a/packages/fs/tool-str-replace-editor/package.json +++ b/packages/fs/tool-str-replace-editor/package.json @@ -24,7 +24,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/goal/command-goal/package.json b/packages/goal/command-goal/package.json index 4999389ba9..f51a794228 100644 --- a/packages/goal/command-goal/package.json +++ b/packages/goal/command-goal/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/goal/goal-round-driver/package.json b/packages/goal/goal-round-driver/package.json index 45c129a4d9..70ed8863f7 100644 --- a/packages/goal/goal-round-driver/package.json +++ b/packages/goal/goal-round-driver/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/goal/goal/package.json b/packages/goal/goal/package.json index 35191dc727..d3e18ee5d9 100644 --- a/packages/goal/goal/package.json +++ b/packages/goal/goal/package.json @@ -43,10 +43,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/goal/tool-goal/package.json b/packages/goal/tool-goal/package.json index ced752cb5f..2901c76c4a 100644 --- a/packages/goal/tool-goal/package.json +++ b/packages/goal/tool-goal/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/guard/repeat-tool-reminder/package.json b/packages/guard/repeat-tool-reminder/package.json index 01e4f133f1..0630fbf74e 100644 --- a/packages/guard/repeat-tool-reminder/package.json +++ b/packages/guard/repeat-tool-reminder/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/guard/timeout-policy/package.json b/packages/guard/timeout-policy/package.json index f201a65b7a..979202b3d1 100644 --- a/packages/guard/timeout-policy/package.json +++ b/packages/guard/timeout-policy/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/host/directory-picker-auto/package.json b/packages/host/directory-picker-auto/package.json index 8e53ea3015..8604d07497 100644 --- a/packages/host/directory-picker-auto/package.json +++ b/packages/host/directory-picker-auto/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/host/directory-picker-browse/package.json b/packages/host/directory-picker-browse/package.json index 0a63fd1412..cbeec7ec28 100644 --- a/packages/host/directory-picker-browse/package.json +++ b/packages/host/directory-picker-browse/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/host/directory-picker-native/package.json b/packages/host/directory-picker-native/package.json index a0fa3c3ffc..b6e6f51544 100644 --- a/packages/host/directory-picker-native/package.json +++ b/packages/host/directory-picker-native/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/worker.cjs", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/host/directory-picker/package.json b/packages/host/directory-picker/package.json index 196f7a42c2..9ff9c1771a 100644 --- a/packages/host/directory-picker/package.json +++ b/packages/host/directory-picker/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/host/frontend-static/package.json b/packages/host/frontend-static/package.json index cf3838d7b0..55bae74223 100644 --- a/packages/host/frontend-static/package.json +++ b/packages/host/frontend-static/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/host/open-in-app/package.json b/packages/host/open-in-app/package.json index 73e408cd06..1ae6ce3c83 100644 --- a/packages/host/open-in-app/package.json +++ b/packages/host/open-in-app/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "scripts": { "bundle": "tsdown", diff --git a/packages/host/plugin-inventory/package.json b/packages/host/plugin-inventory/package.json index 5b30d3501a..90fb43fc2d 100644 --- a/packages/host/plugin-inventory/package.json +++ b/packages/host/plugin-inventory/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/host/product-telemetry-otel/package.json b/packages/host/product-telemetry-otel/package.json index e9122b413e..bcf5683e1e 100644 --- a/packages/host/product-telemetry-otel/package.json +++ b/packages/host/product-telemetry-otel/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/host/webserver/package.json b/packages/host/webserver/package.json index f511ee77e0..6e4f8d79a1 100644 --- a/packages/host/webserver/package.json +++ b/packages/host/webserver/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/identity/anonymous-user-id/package.json b/packages/identity/anonymous-user-id/package.json index 84a809cd29..cdba86320b 100644 --- a/packages/identity/anonymous-user-id/package.json +++ b/packages/identity/anonymous-user-id/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/interaction/commands/package.json b/packages/interaction/commands/package.json index bb72a74e9d..dab73482c5 100644 --- a/packages/interaction/commands/package.json +++ b/packages/interaction/commands/package.json @@ -47,10 +47,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/interaction/permission-presets/package.json b/packages/interaction/permission-presets/package.json index 62df3341dd..44cfe0aca2 100644 --- a/packages/interaction/permission-presets/package.json +++ b/packages/interaction/permission-presets/package.json @@ -43,10 +43,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/interaction/tool-ask-user/package.json b/packages/interaction/tool-ask-user/package.json index d121de03cd..28f129654a 100644 --- a/packages/interaction/tool-ask-user/package.json +++ b/packages/interaction/tool-ask-user/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/interaction/user-approval/package.json b/packages/interaction/user-approval/package.json index 526421ff12..80427f5392 100644 --- a/packages/interaction/user-approval/package.json +++ b/packages/interaction/user-approval/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/interaction/user-questions/package.json b/packages/interaction/user-questions/package.json index 0dbaa98470..d99bc3e736 100644 --- a/packages/interaction/user-questions/package.json +++ b/packages/interaction/user-questions/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/jobs/jobs-local/package.json b/packages/jobs/jobs-local/package.json index fa9b0d9593..b635f6289d 100644 --- a/packages/jobs/jobs-local/package.json +++ b/packages/jobs/jobs-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/jobs/jobs/package.json b/packages/jobs/jobs/package.json index d839816014..06c461e53f 100644 --- a/packages/jobs/jobs/package.json +++ b/packages/jobs/jobs/package.json @@ -32,7 +32,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/jobs/tool-jobs/package.json b/packages/jobs/tool-jobs/package.json index daf45c56d8..3e0530e01e 100644 --- a/packages/jobs/tool-jobs/package.json +++ b/packages/jobs/tool-jobs/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/llm/deepseek-llm-api-extensions/package.json b/packages/llm/deepseek-llm-api-extensions/package.json index 5f4f050d0f..51b03fbb26 100644 --- a/packages/llm/deepseek-llm-api-extensions/package.json +++ b/packages/llm/deepseek-llm-api-extensions/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/llm/llm-deepseek-account/package.json b/packages/llm/llm-deepseek-account/package.json index 411f89e0ea..96895b0c3d 100644 --- a/packages/llm/llm-deepseek-account/package.json +++ b/packages/llm/llm-deepseek-account/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/llm/llm-deepseek-api-key/package.json b/packages/llm/llm-deepseek-api-key/package.json index e906f0e8c4..eea26ff3bf 100644 --- a/packages/llm/llm-deepseek-api-key/package.json +++ b/packages/llm/llm-deepseek-api-key/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/llm/llm-deepseek/package.json b/packages/llm/llm-deepseek/package.json index 2c43750218..a9578b0dd2 100644 --- a/packages/llm/llm-deepseek/package.json +++ b/packages/llm/llm-deepseek/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/llm/llm-pi-ai/package.json b/packages/llm/llm-pi-ai/package.json index b0a087bb1e..d50fe4b0ad 100644 --- a/packages/llm/llm-pi-ai/package.json +++ b/packages/llm/llm-pi-ai/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/llm/llm-retry/package.json b/packages/llm/llm-retry/package.json index afa7ebd17a..04dffa4051 100644 --- a/packages/llm/llm-retry/package.json +++ b/packages/llm/llm-retry/package.json @@ -29,7 +29,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/llm/llm/package.json b/packages/llm/llm/package.json index f22318d520..8adb0ba5db 100644 --- a/packages/llm/llm/package.json +++ b/packages/llm/llm/package.json @@ -51,10 +51,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/llm/plugin-package-inventory-deepseek/package.json b/packages/llm/plugin-package-inventory-deepseek/package.json index c5661a125f..47137912ea 100644 --- a/packages/llm/plugin-package-inventory-deepseek/package.json +++ b/packages/llm/plugin-package-inventory-deepseek/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/llm/token-meter/package.json b/packages/llm/token-meter/package.json index 5e61d820bb..94dbeeb6eb 100644 --- a/packages/llm/token-meter/package.json +++ b/packages/llm/token-meter/package.json @@ -34,7 +34,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/lsp/lsp-stdio/package.json b/packages/lsp/lsp-stdio/package.json index 544d05c053..670566cf85 100644 --- a/packages/lsp/lsp-stdio/package.json +++ b/packages/lsp/lsp-stdio/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/lsp/lsp/package.json b/packages/lsp/lsp/package.json index 8bba976ba7..f6a0184d3a 100644 --- a/packages/lsp/lsp/package.json +++ b/packages/lsp/lsp/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/lsp/tool-lsp/package.json b/packages/lsp/tool-lsp/package.json index d227b47ef8..0191abda65 100644 --- a/packages/lsp/tool-lsp/package.json +++ b/packages/lsp/tool-lsp/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/mcp/mcp-client/package.json b/packages/mcp/mcp-client/package.json index 400adac0ee..c848aa4b99 100644 --- a/packages/mcp/mcp-client/package.json +++ b/packages/mcp/mcp-client/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/mcp/mcp-manager/package.json b/packages/mcp/mcp-manager/package.json index cdca2fa487..da3a466d3d 100644 --- a/packages/mcp/mcp-manager/package.json +++ b/packages/mcp/mcp-manager/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/mcp/mcp-resources/package.json b/packages/mcp/mcp-resources/package.json index 7a31f8be2b..e1c62387a5 100644 --- a/packages/mcp/mcp-resources/package.json +++ b/packages/mcp/mcp-resources/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/plan/plan-mode/package.json b/packages/plan/plan-mode/package.json index c5d7bc11db..1dc10cc19c 100644 --- a/packages/plan/plan-mode/package.json +++ b/packages/plan/plan-mode/package.json @@ -34,7 +34,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/preset/agent-preset-registry/package.json b/packages/preset/agent-preset-registry/package.json index 5e12ffaf7f..3428d6df1e 100644 --- a/packages/preset/agent-preset-registry/package.json +++ b/packages/preset/agent-preset-registry/package.json @@ -43,10 +43,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/preset/agent-preset/package.json b/packages/preset/agent-preset/package.json index 546e5bc1d7..874f30bd76 100644 --- a/packages/preset/agent-preset/package.json +++ b/packages/preset/agent-preset/package.json @@ -26,7 +26,10 @@ "locale/*.json", "lib/index.js", "skills", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/preset/persona/package.json b/packages/preset/persona/package.json index 1594a4c122..0f554f6975 100644 --- a/packages/preset/persona/package.json +++ b/packages/preset/persona/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/ptc-runtime/ptc-runtime-node/package.json b/packages/ptc-runtime/ptc-runtime-node/package.json index f85d88b21d..e10075f7fd 100644 --- a/packages/ptc-runtime/ptc-runtime-node/package.json +++ b/packages/ptc-runtime/ptc-runtime-node/package.json @@ -35,7 +35,10 @@ "lib/configuration.js", "lib/process.js", "lib/persistent-process.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/ptc-runtime/ptc-runtime/package.json b/packages/ptc-runtime/ptc-runtime/package.json index 7506e673bd..58c01c7fd5 100644 --- a/packages/ptc-runtime/ptc-runtime/package.json +++ b/packages/ptc-runtime/ptc-runtime/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/sandbox/sandbox-local/package.json b/packages/sandbox/sandbox-local/package.json index 007e4df73b..a3e55d693e 100644 --- a/packages/sandbox/sandbox-local/package.json +++ b/packages/sandbox/sandbox-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/sandbox/sandbox-policy/package.json b/packages/sandbox/sandbox-policy/package.json index 2721e0a20f..5c1885539d 100644 --- a/packages/sandbox/sandbox-policy/package.json +++ b/packages/sandbox/sandbox-policy/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/sandbox/sandbox-windows-acl/package.json b/packages/sandbox/sandbox-windows-acl/package.json index 054856ec9c..d0b8fda3b7 100644 --- a/packages/sandbox/sandbox-windows-acl/package.json +++ b/packages/sandbox/sandbox-windows-acl/package.json @@ -30,7 +30,10 @@ "lib/runner.js", "lib/types-*.js", "assets", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/sandbox/sandbox/package.json b/packages/sandbox/sandbox/package.json index b2491cfcde..6b6f314b78 100644 --- a/packages/sandbox/sandbox/package.json +++ b/packages/sandbox/sandbox/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/schedule/schedule/package.json b/packages/schedule/schedule/package.json index d36b654ef0..3b53294dd8 100644 --- a/packages/schedule/schedule/package.json +++ b/packages/schedule/schedule/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/schedule/tool-schedule/package.json b/packages/schedule/tool-schedule/package.json index 67f225a2bc..a169143b6d 100644 --- a/packages/schedule/tool-schedule/package.json +++ b/packages/schedule/tool-schedule/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/sdk/client/package.json b/packages/sdk/client/package.json index cc1e009da2..8031b84912 100644 --- a/packages/sdk/client/package.json +++ b/packages/sdk/client/package.json @@ -22,7 +22,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/sdk/protocol/package.json b/packages/sdk/protocol/package.json index 57bbb28ffc..0c827943d7 100644 --- a/packages/sdk/protocol/package.json +++ b/packages/sdk/protocol/package.json @@ -22,7 +22,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/sdk/server/package.json b/packages/sdk/server/package.json index 32f4c6c456..7b8215d860 100644 --- a/packages/sdk/server/package.json +++ b/packages/sdk/server/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/session-query/session-log-export/package.json b/packages/session-query/session-log-export/package.json index c90cdcb271..36cf2027c0 100644 --- a/packages/session-query/session-log-export/package.json +++ b/packages/session-query/session-log-export/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "scripts": { "bundle": "tsdown", diff --git a/packages/session-query/session-query-sqlite/package.json b/packages/session-query/session-query-sqlite/package.json index 7b68a33c21..ea5e770d95 100644 --- a/packages/session-query/session-query-sqlite/package.json +++ b/packages/session-query/session-query-sqlite/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session-query/session-query/package.json b/packages/session-query/session-query/package.json index 253278f6ab..62e97be451 100644 --- a/packages/session-query/session-query/package.json +++ b/packages/session-query/session-query/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/message-quotes/package.json b/packages/session/message-quotes/package.json index 9e0b168bf7..6ab3d52c52 100644 --- a/packages/session/message-quotes/package.json +++ b/packages/session/message-quotes/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/client.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-checkpoint-policy/package.json b/packages/session/session-checkpoint-policy/package.json index 0c5f92f5c6..800adff0bd 100644 --- a/packages/session/session-checkpoint-policy/package.json +++ b/packages/session/session-checkpoint-policy/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-format-catalog/package.json b/packages/session/session-format-catalog/package.json index f5d08838f3..6994a9b107 100644 --- a/packages/session/session-format-catalog/package.json +++ b/packages/session/session-format-catalog/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/session/session-format-v0-to-v1/package.json b/packages/session/session-format-v0-to-v1/package.json index 2cff709db5..ef01975cf9 100644 --- a/packages/session/session-format-v0-to-v1/package.json +++ b/packages/session/session-format-v0-to-v1/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/session/session-format-v1-to-v2/package.json b/packages/session/session-format-v1-to-v2/package.json index a4ffe004bd..8336314a5a 100644 --- a/packages/session/session-format-v1-to-v2/package.json +++ b/packages/session/session-format-v1-to-v2/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/session/session-format-v2-to-v3/package.json b/packages/session/session-format-v2-to-v3/package.json index 645e5de0e8..98f5ac07d7 100644 --- a/packages/session/session-format-v2-to-v3/package.json +++ b/packages/session/session-format-v2-to-v3/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/session/session-format-v3-to-v4/package.json b/packages/session/session-format-v3-to-v4/package.json index cacd58bf6e..debebe3437 100644 --- a/packages/session/session-format-v3-to-v4/package.json +++ b/packages/session/session-format-v3-to-v4/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/session/session-format/package.json b/packages/session/session-format/package.json index e0bf7afc66..05ec08a0ba 100644 --- a/packages/session/session-format/package.json +++ b/packages/session/session-format/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/session/session-log-deepseek/package.json b/packages/session/session-log-deepseek/package.json index fd6420c6a2..86859576d5 100644 --- a/packages/session/session-log-deepseek/package.json +++ b/packages/session/session-log-deepseek/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/session/session-persistence-jsonl/package.json b/packages/session/session-persistence-jsonl/package.json index 5823261040..9435032875 100644 --- a/packages/session/session-persistence-jsonl/package.json +++ b/packages/session/session-persistence-jsonl/package.json @@ -26,7 +26,10 @@ "locale/*.json", "lib/index.js", "lib/worker.cjs", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-persistence/package.json b/packages/session/session-persistence/package.json index 512f365d2a..b75f082c99 100644 --- a/packages/session/session-persistence/package.json +++ b/packages/session/session-persistence/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-projection-cache/package.json b/packages/session/session-projection-cache/package.json index e200a132ef..460677d3bb 100644 --- a/packages/session/session-projection-cache/package.json +++ b/packages/session/session-projection-cache/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/session/session-projection/package.json b/packages/session/session-projection/package.json index 3a79adaefa..63e2285c02 100644 --- a/packages/session/session-projection/package.json +++ b/packages/session/session-projection/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/session/session-stats/package.json b/packages/session/session-stats/package.json index 57cdef0fcb..c5b207e47d 100644 --- a/packages/session/session-stats/package.json +++ b/packages/session/session-stats/package.json @@ -34,7 +34,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-telemetry-otel/package.json b/packages/session/session-telemetry-otel/package.json index 4ac2214d51..36ed9d3a44 100644 --- a/packages/session/session-telemetry-otel/package.json +++ b/packages/session/session-telemetry-otel/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/session/session-telemetry/package.json b/packages/session/session-telemetry/package.json index ec5d6940ea..91ae8b9c2a 100644 --- a/packages/session/session-telemetry/package.json +++ b/packages/session/session-telemetry/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-title-first-prompt-llm/package.json b/packages/session/session-title-first-prompt-llm/package.json index abdd80e8d6..a8c6ee93ba 100644 --- a/packages/session/session-title-first-prompt-llm/package.json +++ b/packages/session/session-title-first-prompt-llm/package.json @@ -24,7 +24,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-title-llm/package.json b/packages/session/session-title-llm/package.json index 9c33554277..a95a22c7ed 100644 --- a/packages/session/session-title-llm/package.json +++ b/packages/session/session-title-llm/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-title/package.json b/packages/session/session-title/package.json index e01db38dfc..8cf0c9db67 100644 --- a/packages/session/session-title/package.json +++ b/packages/session/session-title/package.json @@ -34,7 +34,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/session-turn-outline/package.json b/packages/session/session-turn-outline/package.json index 6797c53d16..b395b20ef8 100644 --- a/packages/session/session-turn-outline/package.json +++ b/packages/session/session-turn-outline/package.json @@ -34,7 +34,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/tool-working-directory/package.json b/packages/session/tool-working-directory/package.json index d3186bbd73..1366af2e7b 100644 --- a/packages/session/tool-working-directory/package.json +++ b/packages/session/tool-working-directory/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/session/working-directory/package.json b/packages/session/working-directory/package.json index 57d1666fcd..af6666f0e0 100644 --- a/packages/session/working-directory/package.json +++ b/packages/session/working-directory/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/settings/settings/package.json b/packages/settings/settings/package.json index 2a611a16c3..9f7592088d 100644 --- a/packages/settings/settings/package.json +++ b/packages/settings/settings/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/bash-local/package.json b/packages/shell/bash-local/package.json index 5d979f4b82..d4b5947a19 100644 --- a/packages/shell/bash-local/package.json +++ b/packages/shell/bash-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/bash-sandbox/package.json b/packages/shell/bash-sandbox/package.json index 859c5a9403..5a0f57d038 100644 --- a/packages/shell/bash-sandbox/package.json +++ b/packages/shell/bash-sandbox/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/pwsh-local/package.json b/packages/shell/pwsh-local/package.json index 4759917a0c..e3be23695d 100644 --- a/packages/shell/pwsh-local/package.json +++ b/packages/shell/pwsh-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/pwsh-sandbox/package.json b/packages/shell/pwsh-sandbox/package.json index 7419e4df54..957d6c8f77 100644 --- a/packages/shell/pwsh-sandbox/package.json +++ b/packages/shell/pwsh-sandbox/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/shell-env/README.i18n.yaml b/packages/shell/shell-env/README.i18n.yaml index 6468fd1da2..63f09470f2 100644 --- a/packages/shell/shell-env/README.i18n.yaml +++ b/packages/shell/shell-env/README.i18n.yaml @@ -18,8 +18,8 @@ en: 34d2f05183df200f zh: 7753b97c91743901 /deepseek-ai-dsh-shell-env/use-this-package/what-every-shell-call-receives: - en: eae86664fefc6690 - zh: 05a4e5946c8d2b87 + en: bab0b75fb967d41a + zh: 8f636d9965d01ad1 /deepseek-ai-dsh-shell-env/use-this-package/adding-your-own-environment-facts: en: 21ef223626e35905 zh: 5c468055099b0135 @@ -27,14 +27,14 @@ en: 0041438f2b7f7e4f zh: 93fa165b07adcdf4 /deepseek-ai-dsh-shell-env/use-this-package/what-can-go-wrong: - en: 42c75945b581b7e6 - zh: 6b5c487cfa28b206 + en: 737e5607cb1229cc + zh: 835b3f225d91f6ea /deepseek-ai-dsh-shell-env/understand-the-implementation: en: f782557ca8da3138 zh: e8f0082b9692cacc /deepseek-ai-dsh-shell-env/understand-the-implementation/design-philosophy: - en: 311b66ea29b5702f - zh: 3a98c2fb1fcaa519 + en: 5438a951817526d9 + zh: 66459cdea830a8c8 /deepseek-ai-dsh-shell-env/understand-the-implementation/source-map: en: 72eba3bfadcfa581 zh: dcd83e02a1910f27 @@ -51,8 +51,8 @@ en: e95e649f0410fa75 zh: b3d64877420b4c0d /deepseek-ai-dsh-shell-env/known-limitations-and-deferred-work: - en: be9888161315f026 - zh: 97d1d05c1c322596 + en: e61f29904019b35b + zh: bfe2e8363d6c7e58 /deepseek-ai-dsh-shell-env/known-limitations-and-deferred-work/dev-note: en: e67f633dc6fe7773 zh: 3bb0c20c93f16f98 diff --git a/packages/shell/shell-env/README.md b/packages/shell/shell-env/README.md index fc53004803..c2507b3c7c 100644 --- a/packages/shell/shell-env/README.md +++ b/packages/shell/shell-env/README.md @@ -29,7 +29,7 @@ Load this plugin in any composition that mounts a model shell tool (`dsh-tool-ba ### What every shell call receives -Every call receives `DSH_HOME` (the absolute Harness home), `DSH_SHELL=1`, and, for agent calls, `DSH_SESSION_ID` (the calling session's id). When the launcher provided a profile context, every call also receives `DSH_PROFILE` (the profile name) and `DSH_PROFILE_DIR` (its absolute directory; its `node_modules` holds only profile-installed packages, while the harness's own bundles resolve from the dsh installation); compositions booted without a profile omit both. +Every call receives `DSH_HOME` (the absolute Harness home), `DSH_SHELL=1`, and, for agent calls, `DSH_SESSION_ID` (the calling session's id). Outside a single-executable application, every call also receives `DSH_NODE_EXECUTABLE`, the absolute path of the executable running the Harness. Under Desktop that is the Electron executable: it runs a script as Node only with `ELECTRON_RUN_AS_NODE=1`, and its Node file APIs read entries inside the `app.asar` archive that ordinary tools cannot open. When the launcher provided a profile context, every call also receives `DSH_PROFILE` (the profile name), `DSH_PROFILE_DIR` (its absolute directory; its `node_modules` holds only profile-installed packages, while the harness's own bundles resolve from the dsh installation), and `DSH_INSTALL_DIR` (the absolute directory of the `@deepseek-ai/dsh` package that anchors the installation, which carries the published `docs/` and `src/`); compositions booted without a profile omit all three. ### Adding your own environment facts @@ -64,7 +64,7 @@ The generated [configuration catalog](../../../docs/config-catalog.md#deepseek-a ### What can go wrong -Two contributors declaring the same key, or a contributor claiming a reserved built-in (`DSH_HOME`, `DSH_SHELL`, `DSH_SESSION_ID`, `DSH_PROFILE`, `DSH_PROFILE_DIR`), fails plugin load loudly. A `DSH_*` key must be all-caps with underscores (for example `DSH_REGION`), and a missing description fails registration. +Two contributors declaring the same key, or a contributor claiming a reserved built-in (`DSH_HOME`, `DSH_SHELL`, `DSH_SESSION_ID`, `DSH_PROFILE`, `DSH_PROFILE_DIR`, `DSH_INSTALL_DIR`, `DSH_NODE_EXECUTABLE`), fails plugin load loudly. A `DSH_*` key must be all-caps with underscores (for example `DSH_REGION`), and a missing description fails registration. ----- @@ -80,7 +80,7 @@ This section explains the design decisions behind the registry and points at the - **Trusted namespace, rebuilt per call.** The environment is a Harness-owned `DSH_*` namespace: the shell executor discards inherited `DSH_*` values and merges the registry's current snapshot for each execution, so nested harnesses and concurrent parent/child agents cannot leak stale identities, and `process.env` is never modified. - **Declared ownership, loud conflicts.** Contributors declare their keys up front so duplicate ownership is detected before the first command; resolvers may only return declared keys. -- **Built-ins stay here.** `DSH_HOME`, `DSH_SHELL`, `DSH_SESSION_ID`, `DSH_PROFILE`, and `DSH_PROFILE_DIR` are reserved for the registry; contributors cannot claim them. +- **Built-ins stay here.** `DSH_HOME`, `DSH_SHELL`, `DSH_SESSION_ID`, `DSH_PROFILE`, `DSH_PROFILE_DIR`, `DSH_INSTALL_DIR`, and `DSH_NODE_EXECUTABLE` are reserved for the registry; contributors cannot claim them. ### Source map @@ -126,7 +126,7 @@ The managed environment never enters the request prefix, so it does not invalida These limits define when the registry is a poor fit or needs care. They are current package constraints, not a task backlog. -- **`list()` enumerates plugin-contributed variables only** — registry-owned built-ins (`DSH_HOME`, `DSH_SHELL`, `DSH_SESSION_ID`, `DSH_PROFILE`, `DSH_PROFILE_DIR`) are not included, so diagnostics, prompt, or UI code must not treat `list()` as an exhaustive environment catalog. +- **`list()` enumerates plugin-contributed variables only** — registry-owned built-ins (`DSH_HOME`, `DSH_SHELL`, `DSH_SESSION_ID`, `DSH_PROFILE`, `DSH_PROFILE_DIR`, `DSH_INSTALL_DIR`, `DSH_NODE_EXECUTABLE`) are not included, so diagnostics, prompt, or UI code must not treat `list()` as an exhaustive environment catalog. ### Dev Note diff --git a/packages/shell/shell-env/README.zh.md b/packages/shell/shell-env/README.zh.md index 1abd456c82..8860c11b54 100644 --- a/packages/shell/shell-env/README.zh.md +++ b/packages/shell/shell-env/README.zh.md @@ -29,7 +29,7 @@ kind: "package-reference" ### 每次 shell 调用都会收到什么 -每次调用都会收到 `DSH_HOME`(Harness 主目录的绝对路径)、`DSH_SHELL=1`,agent 调用还会收到 `DSH_SESSION_ID`(调用方会话的 id)。启动器提供了 profile 上下文时,每次调用还会收到 `DSH_PROFILE`(profile 名)与 `DSH_PROFILE_DIR`(其绝对目录;其 `node_modules` 只存放 profile 自行安装的包,harness 自带的组合包从 dsh 安装目录解析);不带 profile 启动的组合则两者都没有。 +每次调用都会收到 `DSH_HOME`(Harness 主目录的绝对路径)、`DSH_SHELL=1`,agent 调用还会收到 `DSH_SESSION_ID`(调用方会话的 id)。不在单可执行文件应用中运行时,每次调用还会收到 `DSH_NODE_EXECUTABLE`,即运行 Harness 的可执行文件的绝对路径。Desktop 下它是 Electron 可执行文件:只有设置 `ELECTRON_RUN_AS_NODE=1` 时它才以 Node 方式运行脚本,其 Node 文件 API 能读取普通工具打不开的 `app.asar` 归档内条目。启动器提供了 profile 上下文时,每次调用还会收到 `DSH_PROFILE`(profile 名)、`DSH_PROFILE_DIR`(其绝对目录;其 `node_modules` 只存放 profile 自行安装的包,harness 自带的组合包从 dsh 安装目录解析)与 `DSH_INSTALL_DIR`(作为安装锚点的 `@deepseek-ai/dsh` 包的绝对目录,随包发布的 `docs/` 与 `src/` 位于其中);不带 profile 启动的组合则三者都没有。 ### 添加你自己的环境事实 @@ -64,7 +64,7 @@ contributor 必须声明它返回的每个键;返回未声明或非字符串 ### 可能出什么问题 -两个 contributor 声明同一个键,或 contributor 声称拥有保留内置键(`DSH_HOME`、`DSH_SHELL`、`DSH_SESSION_ID`、`DSH_PROFILE`、`DSH_PROFILE_DIR`),都会导致插件加载时明确报错。`DSH_*` 键必须全大写并带下划线(例如 `DSH_REGION`),缺少描述也会让注册失败。 +两个 contributor 声明同一个键,或 contributor 声称拥有保留内置键(`DSH_HOME`、`DSH_SHELL`、`DSH_SESSION_ID`、`DSH_PROFILE`、`DSH_PROFILE_DIR`、`DSH_INSTALL_DIR`、`DSH_NODE_EXECUTABLE`),都会导致插件加载时明确报错。`DSH_*` 键必须全大写并带下划线(例如 `DSH_REGION`),缺少描述也会让注册失败。 ----- @@ -80,7 +80,7 @@ contributor 必须声明它返回的每个键;返回未声明或非字符串 - **受信命名空间,每次调用重建。** 环境是归 Harness 所有的 `DSH_*` 命名空间:shell 执行器丢弃继承的 `DSH_*` 值,并为每次执行合并注册表的当前快照,因此嵌套 harness 与并发的父子 agent 无法泄漏陈旧身份,`process.env` 也永不被修改。 - **声明所有权,冲突明确报错。** contributor 预先声明键,使重复所有权在第一条命令之前就被发现;resolver 只能返回已声明的键。 -- **内置键留在这里。** `DSH_HOME`、`DSH_SHELL`、`DSH_SESSION_ID`、`DSH_PROFILE` 与 `DSH_PROFILE_DIR` 为注册表保留;contributor 不能声称拥有它们。 +- **内置键留在这里。** `DSH_HOME`、`DSH_SHELL`、`DSH_SESSION_ID`、`DSH_PROFILE`、`DSH_PROFILE_DIR`、`DSH_INSTALL_DIR` 与 `DSH_NODE_EXECUTABLE` 为注册表保留;contributor 不能声称拥有它们。 ### 源码地图 @@ -126,7 +126,7 @@ contributor 必须声明它返回的每个键;返回未声明或非字符串 这些限制说明注册表何时不合适或需要小心使用。它们是当前包约束,不是任务积压。 -- **`list()` 只枚举插件贡献的变量**——注册表自有的内置键(`DSH_HOME`、`DSH_SHELL`、`DSH_SESSION_ID`、`DSH_PROFILE`、`DSH_PROFILE_DIR`)不包含在内,因此诊断、提示词或 UI 代码不得把 `list()` 当作完整的环境目录。 +- **`list()` 只枚举插件贡献的变量**——注册表自有的内置键(`DSH_HOME`、`DSH_SHELL`、`DSH_SESSION_ID`、`DSH_PROFILE`、`DSH_PROFILE_DIR`、`DSH_INSTALL_DIR`、`DSH_NODE_EXECUTABLE`)不包含在内,因此诊断、提示词或 UI 代码不得把 `list()` 当作完整的环境目录。 ### 开发备注 diff --git a/packages/shell/shell-env/package.json b/packages/shell/shell-env/package.json index 5969f2d571..4fb761f034 100644 --- a/packages/shell/shell-env/package.json +++ b/packages/shell/shell-env/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/shell-env/src/index.ts b/packages/shell/shell-env/src/index.ts index 36752364dd..d53a393a8d 100644 --- a/packages/shell/shell-env/src/index.ts +++ b/packages/shell/shell-env/src/index.ts @@ -8,6 +8,7 @@ * @module @deepseek-ai/dsh-shell-env */ +import { dirname } from 'node:path' import { Service, type Context } from '@deepseek-ai/cordis' import z from '@deepseek-ai/schemastery' import { DSH_ENV_PREFIX } from '@deepseek-ai/dsh-shell' @@ -73,12 +74,16 @@ const DSH_SHELL_KEY = `${DSH_ENV_PREFIX}SHELL` as const const DSH_SESSION_ID_KEY = `${DSH_ENV_PREFIX}SESSION_ID` as const const DSH_PROFILE_KEY = `${DSH_ENV_PREFIX}PROFILE` as const const DSH_PROFILE_DIR_KEY = `${DSH_ENV_PREFIX}PROFILE_DIR` as const +const DSH_INSTALL_DIR_KEY = `${DSH_ENV_PREFIX}INSTALL_DIR` as const +const DSH_NODE_EXECUTABLE_KEY = `${DSH_ENV_PREFIX}NODE_EXECUTABLE` as const const RESERVED_BASH_ENV_KEYS = new Set([ DSH_HOME_ENV, DSH_SHELL_KEY, DSH_SESSION_ID_KEY, DSH_PROFILE_KEY, DSH_PROFILE_DIR_KEY, + DSH_INSTALL_DIR_KEY, + DSH_NODE_EXECUTABLE_KEY, ]) const BASH_ENV_KEY_SUFFIX = /^[A-Z][A-Z0-9_]*$/ @@ -158,6 +163,10 @@ export class ShellEnvRegistry extends Service { [DSH_HOME_ENV]: this.dshHome, [DSH_SHELL_KEY]: '1', } + // A single-executable application runs its embedded entry instead of a script argument. The + // browser worker image answers no `node:sea`, so the module is looked up at run time. + const sea = process.getBuiltinModule('node:sea') as typeof import('node:sea') | undefined + if (sea === undefined || !sea.isSea()) values[DSH_NODE_EXECUTABLE_KEY] = process.execPath if (execution.agent !== undefined) { values[DSH_SESSION_ID_KEY] = execution.agent.session.header.id } @@ -165,6 +174,7 @@ export class ShellEnvRegistry extends Service { if (profile !== undefined) { values[DSH_PROFILE_KEY] = profile.name values[DSH_PROFILE_DIR_KEY] = profile.dir + values[DSH_INSTALL_DIR_KEY] = dirname(profile.installAnchor) } for (const contributor of [...this.contributors.values()].sort((left, right) => left.name.localeCompare(right.name))) { diff --git a/packages/shell/shell-env/tests/shell-env.spec.ts b/packages/shell/shell-env/tests/shell-env.spec.ts index ad0cf49102..e14d41b06c 100644 --- a/packages/shell/shell-env/tests/shell-env.spec.ts +++ b/packages/shell/shell-env/tests/shell-env.spec.ts @@ -17,7 +17,7 @@ import * as BashEnvPlugin from '@deepseek-ai/dsh-shell-env' const testToolSignal = new AbortController().signal -afterEach(() => vi.unstubAllEnvs()) +afterEach(() => { vi.unstubAllEnvs(); vi.restoreAllMocks() }) function execution(sessionId?: string): ToolExecution { return { @@ -46,28 +46,44 @@ describe('ShellEnvRegistry', () => { expect(registry.collect(execution())).toEqual({ DSH_HOME: resolve('./test-dsh-home'), + DSH_NODE_EXECUTABLE: process.execPath, DSH_SHELL: '1', }) expect(registry.collect(execution('session-a'))).toEqual({ DSH_HOME: resolve('./test-dsh-home'), + DSH_NODE_EXECUTABLE: process.execPath, DSH_SESSION_ID: 'session-a', DSH_SHELL: '1', }) }) - it('collects the launcher-provided profile name and directory when a profile context exists', () => { + it('omits the Node executable inside a single-executable application', () => { + vi.spyOn(process, 'getBuiltinModule').mockReturnValue({ isSea: () => true }) + expect(new ShellEnvRegistry(new Context()).collect(execution())).not.toHaveProperty('DSH_NODE_EXECUTABLE') + }) + + it('keeps the Node executable where the runtime answers no single-executable module', () => { + vi.spyOn(process, 'getBuiltinModule').mockReturnValue(undefined) + expect(new ShellEnvRegistry(new Context()).collect(execution()).DSH_NODE_EXECUTABLE).toBe(process.execPath) + }) + + it('collects the launcher-provided profile name, directory, and installation directory when a profile context exists', () => { const ctx = new Context() ctx.provide('profileContext', { name: 'web', dir: '/profiles/web', patchPath: '/profiles/web/cordis.patch.yml', installAnchor: '/dsh/package.json', cwd: '/work', home: '/home', startedBundles: [], overlays: [], telemetryDisabledEnv: undefined, }) const registry = new ShellEnvRegistry(ctx, { dshHome: './test-dsh-home' }) - expect(registry.collect(execution())).toMatchObject({ DSH_PROFILE: 'web', DSH_PROFILE_DIR: '/profiles/web' }) - expect(() => registry.register({ - name: 'profile-claimer', - variables: { DSH_PROFILE: { description: 'Reserved key.' } }, - resolve: () => ({}), - })).toThrow(/reserved key "DSH_PROFILE"/) + expect(registry.collect(execution())).toMatchObject({ + DSH_INSTALL_DIR: '/dsh', DSH_PROFILE: 'web', DSH_PROFILE_DIR: '/profiles/web', + }) + for (const key of ['DSH_PROFILE', 'DSH_INSTALL_DIR', 'DSH_NODE_EXECUTABLE']) { + expect(() => registry.register({ + name: `${key}-claimer`, + variables: { [key]: { description: 'Reserved key.' } }, + resolve: () => ({}), + })).toThrow(new RegExp(`reserved key "${key}"`)) + } }) it('resolves DSH_HOME from the ambient override or the user-home default', () => { diff --git a/packages/shell/shell/package.json b/packages/shell/shell/package.json index f18caa909c..0cea4dc97d 100644 --- a/packages/shell/shell/package.json +++ b/packages/shell/shell/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/tool-bash-persistent/package.json b/packages/shell/tool-bash-persistent/package.json index 05f797c988..7690f11119 100644 --- a/packages/shell/tool-bash-persistent/package.json +++ b/packages/shell/tool-bash-persistent/package.json @@ -24,7 +24,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/tool-bash/package.json b/packages/shell/tool-bash/package.json index 52e3852396..3d7102e3a9 100644 --- a/packages/shell/tool-bash/package.json +++ b/packages/shell/tool-bash/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/tool-bash/tests/tools.spec.ts b/packages/shell/tool-bash/tests/tools.spec.ts index 415cd0504d..d3f20572f8 100644 --- a/packages/shell/tool-bash/tests/tools.spec.ts +++ b/packages/shell/tool-bash/tests/tools.spec.ts @@ -1387,6 +1387,7 @@ describe('the model-facing bash tool builds its request from named args only (no expect(bash.requests[0]?.dshEnv).toEqual({ DSH_HOME: recordingDshHome, + DSH_NODE_EXECUTABLE: process.execPath, DSH_SESSION_ID: 'request-fg', DSH_SHELL: '1', }) @@ -1413,6 +1414,7 @@ describe('the model-facing bash tool builds its request from named args only (no expect(bash.requests[0]?.env).toBeUndefined() expect(bash.requests[0]?.dshEnv).toEqual({ DSH_HOME: recordingDshHome, + DSH_NODE_EXECUTABLE: process.execPath, DSH_SESSION_ID: 'request-bg', DSH_SHELL: '1', }) @@ -1436,11 +1438,13 @@ describe('the model-facing bash tool builds its request from named args only (no expect(bash.requests.map(request => request.dshEnv)).toEqual([ { DSH_HOME: recordingDshHome, + DSH_NODE_EXECUTABLE: process.execPath, DSH_SESSION_ID: 'request-parent', DSH_SHELL: '1', }, { DSH_HOME: recordingDshHome, + DSH_NODE_EXECUTABLE: process.execPath, DSH_SESSION_ID: 'request-child', DSH_SHELL: '1', }, diff --git a/packages/shell/tool-pwsh-persistent/package.json b/packages/shell/tool-pwsh-persistent/package.json index fdb7903b0d..59e41e4ae3 100644 --- a/packages/shell/tool-pwsh-persistent/package.json +++ b/packages/shell/tool-pwsh-persistent/package.json @@ -24,7 +24,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/tool-pwsh/package.json b/packages/shell/tool-pwsh/package.json index bf7675f6f0..360190080e 100644 --- a/packages/shell/tool-pwsh/package.json +++ b/packages/shell/tool-pwsh/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/shell/tool-pwsh/tests/tools.spec.ts b/packages/shell/tool-pwsh/tests/tools.spec.ts index 4cf493658c..731da47a4c 100644 --- a/packages/shell/tool-pwsh/tests/tools.spec.ts +++ b/packages/shell/tool-pwsh/tests/tools.spec.ts @@ -457,6 +457,7 @@ describe('execution through the bash seam', () => { expect(request?.timeoutMs).toBe(1234) expect(request?.dshEnv).toEqual({ DSH_HOME: dshHome, + DSH_NODE_EXECUTABLE: process.execPath, DSH_SHELL: '1', DSH_SESSION_ID: 'session-1', }) diff --git a/packages/skill/skill-filesystem/package.json b/packages/skill/skill-filesystem/package.json index e469d7fc5f..249674af53 100644 --- a/packages/skill/skill-filesystem/package.json +++ b/packages/skill/skill-filesystem/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/skill/skill-office/package.json b/packages/skill/skill-office/package.json index df17f615b0..559cbf7f0d 100644 --- a/packages/skill/skill-office/package.json +++ b/packages/skill/skill-office/package.json @@ -25,7 +25,10 @@ "locale/*.json", "lib/index.js", "assets", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/skill/skill/package.json b/packages/skill/skill/package.json index 887e7341a4..7b773a1ae1 100644 --- a/packages/skill/skill/package.json +++ b/packages/skill/skill/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/skill/tool-skill/package.json b/packages/skill/tool-skill/package.json index 0fa8f4a63c..cab7866366 100644 --- a/packages/skill/tool-skill/package.json +++ b/packages/skill/tool-skill/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/skill/tool-workspace-dependencies/package.json b/packages/skill/tool-workspace-dependencies/package.json index 46e03373b6..479d24d75f 100644 --- a/packages/skill/tool-workspace-dependencies/package.json +++ b/packages/skill/tool-workspace-dependencies/package.json @@ -24,7 +24,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/spill/spill-local/package.json b/packages/spill/spill-local/package.json index cdfeb7a999..f65ad9d50a 100644 --- a/packages/spill/spill-local/package.json +++ b/packages/spill/spill-local/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/spill/spill-policy/package.json b/packages/spill/spill-policy/package.json index 07b90b4cc5..e544722dda 100644 --- a/packages/spill/spill-policy/package.json +++ b/packages/spill/spill-policy/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/spill/spill/package.json b/packages/spill/spill/package.json index 5aae235a31..ec156b5a5a 100644 --- a/packages/spill/spill/package.json +++ b/packages/spill/spill/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/ssh/fs-ssh/package.json b/packages/ssh/fs-ssh/package.json index b2cbbaf7e6..1062d4bef4 100644 --- a/packages/ssh/fs-ssh/package.json +++ b/packages/ssh/fs-ssh/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/ssh/sandbox-ssh/package.json b/packages/ssh/sandbox-ssh/package.json index dc99661cdd..11eb8a66df 100644 --- a/packages/ssh/sandbox-ssh/package.json +++ b/packages/ssh/sandbox-ssh/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/ssh/ssh-helper-runtime/package.json b/packages/ssh/ssh-helper-runtime/package.json index 98e57ab4ad..4e37cebe8b 100644 --- a/packages/ssh/ssh-helper-runtime/package.json +++ b/packages/ssh/ssh-helper-runtime/package.json @@ -15,7 +15,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/ssh/ssh/package.json b/packages/ssh/ssh/package.json index 0dec2898f7..6085e4f057 100644 --- a/packages/ssh/ssh/package.json +++ b/packages/ssh/ssh/package.json @@ -43,7 +43,10 @@ "lib/protocol-*.js", "lib/schemas-*.js", "lib/stream-security-*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/ssh/subprocess-ssh/package.json b/packages/ssh/subprocess-ssh/package.json index e9f64b5dee..5a8583d4dd 100644 --- a/packages/ssh/subprocess-ssh/package.json +++ b/packages/ssh/subprocess-ssh/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/storage/storage-domain/package.json b/packages/storage/storage-domain/package.json index 4acae41693..d59737b889 100644 --- a/packages/storage/storage-domain/package.json +++ b/packages/storage/storage-domain/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/storage/storage-json/package.json b/packages/storage/storage-json/package.json index 5174a41a00..7dd2b33e54 100644 --- a/packages/storage/storage-json/package.json +++ b/packages/storage/storage-json/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/storage/storage-sqlite/package.json b/packages/storage/storage-sqlite/package.json index 02ff6c7db5..7c057adebe 100644 --- a/packages/storage/storage-sqlite/package.json +++ b/packages/storage/storage-sqlite/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/storage/storage/package.json b/packages/storage/storage/package.json index 2eafe4661b..9282eac47f 100644 --- a/packages/storage/storage/package.json +++ b/packages/storage/storage/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subagent/subagent-acp/package.json b/packages/subagent/subagent-acp/package.json index 31a48498c6..5bf2aa1f6b 100644 --- a/packages/subagent/subagent-acp/package.json +++ b/packages/subagent/subagent-acp/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subagent/subagent-claude-code/package.json b/packages/subagent/subagent-claude-code/package.json index 29f71dead8..13ee4081cb 100644 --- a/packages/subagent/subagent-claude-code/package.json +++ b/packages/subagent/subagent-claude-code/package.json @@ -28,7 +28,10 @@ "locale/*.json", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/subagent/subagent-codex/package.json b/packages/subagent/subagent-codex/package.json index a98d3072eb..6604ad9373 100644 --- a/packages/subagent/subagent-codex/package.json +++ b/packages/subagent/subagent-codex/package.json @@ -28,7 +28,10 @@ "locale/*.json", "lib/index.js", "cordis.patch.yml", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dsh": { diff --git a/packages/subagent/subagent-dsh-sdk/package.json b/packages/subagent/subagent-dsh-sdk/package.json index 09958a2034..00e9aa57ca 100644 --- a/packages/subagent/subagent-dsh-sdk/package.json +++ b/packages/subagent/subagent-dsh-sdk/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subagent/subagent-fork-in-process/package.json b/packages/subagent/subagent-fork-in-process/package.json index dedf7cf9ad..44522d6c8e 100644 --- a/packages/subagent/subagent-fork-in-process/package.json +++ b/packages/subagent/subagent-fork-in-process/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subagent/subagent-spawn-in-process/package.json b/packages/subagent/subagent-spawn-in-process/package.json index f7a8277507..b82531af90 100644 --- a/packages/subagent/subagent-spawn-in-process/package.json +++ b/packages/subagent/subagent-spawn-in-process/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subagent/subagent/package.json b/packages/subagent/subagent/package.json index 589ce69ab3..0b6494b2c4 100644 --- a/packages/subagent/subagent/package.json +++ b/packages/subagent/subagent/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/subagent/tool-subagent-control/package.json b/packages/subagent/tool-subagent-control/package.json index 1bdb20378b..b1d1a2943f 100644 --- a/packages/subagent/tool-subagent-control/package.json +++ b/packages/subagent/tool-subagent-control/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subagent/tool-subagent/package.json b/packages/subagent/tool-subagent/package.json index 596b19c60a..53f48ccb7a 100644 --- a/packages/subagent/tool-subagent/package.json +++ b/packages/subagent/tool-subagent/package.json @@ -32,7 +32,10 @@ "locale/model-selection-settings/*.json", "lib/index.js", "lib/model-selection-settings.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subprocess/subprocess-local/package.json b/packages/subprocess/subprocess-local/package.json index 1d542da1a8..f546effcaf 100644 --- a/packages/subprocess/subprocess-local/package.json +++ b/packages/subprocess/subprocess-local/package.json @@ -37,7 +37,10 @@ "lib/runner-*.js", "lib/output.js", "scripts/ensure-spawn-helper.mjs", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "scripts": { "postinstall": "node scripts/ensure-spawn-helper.mjs" diff --git a/packages/subprocess/subprocess/package.json b/packages/subprocess/subprocess/package.json index 7b3c498844..9fb7353455 100644 --- a/packages/subprocess/subprocess/package.json +++ b/packages/subprocess/subprocess/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/control.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/subprocess/win32-process/package.json b/packages/subprocess/win32-process/package.json index 5d6f8b06a8..7f3d76d56f 100644 --- a/packages/subprocess/win32-process/package.json +++ b/packages/subprocess/win32-process/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/team/agent-team/package.json b/packages/team/agent-team/package.json index 64f609a105..c72efe2730 100644 --- a/packages/team/agent-team/package.json +++ b/packages/team/agent-team/package.json @@ -43,10 +43,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/team/tool-agent-team/package.json b/packages/team/tool-agent-team/package.json index 7af084feb3..b1ebc7d4f9 100644 --- a/packages/team/tool-agent-team/package.json +++ b/packages/team/tool-agent-team/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/telemetry/otel/package.json b/packages/telemetry/otel/package.json index f7bb30ae55..40c82eb558 100644 --- a/packages/telemetry/otel/package.json +++ b/packages/telemetry/otel/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/terminal/terminal-bash/package.json b/packages/terminal/terminal-bash/package.json index 44b73fa873..88b5ea4a5b 100644 --- a/packages/terminal/terminal-bash/package.json +++ b/packages/terminal/terminal-bash/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/terminal/terminal/package.json b/packages/terminal/terminal/package.json index 561277f46e..afccf4fbac 100644 --- a/packages/terminal/terminal/package.json +++ b/packages/terminal/terminal/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/test-support/agent-loop-testkit/package.json b/packages/test-support/agent-loop-testkit/package.json index fd1af40129..7b6191d82b 100644 --- a/packages/test-support/agent-loop-testkit/package.json +++ b/packages/test-support/agent-loop-testkit/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/test-support/client-runtime/package.json b/packages/test-support/client-runtime/package.json index fcfa6031c9..9a221a8fa0 100644 --- a/packages/test-support/client-runtime/package.json +++ b/packages/test-support/client-runtime/package.json @@ -93,6 +93,9 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/test-support/llm-mock-server/package.json b/packages/test-support/llm-mock-server/package.json index c7ecc6aaa5..2b6ed4a76a 100644 --- a/packages/test-support/llm-mock-server/package.json +++ b/packages/test-support/llm-mock-server/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/test-support/llm-replay/package.json b/packages/test-support/llm-replay/package.json index f49297b12c..22b584cc42 100644 --- a/packages/test-support/llm-replay/package.json +++ b/packages/test-support/llm-replay/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/test-support/loader-smoke/package.json b/packages/test-support/loader-smoke/package.json index 68a800376f..5af2a84a00 100644 --- a/packages/test-support/loader-smoke/package.json +++ b/packages/test-support/loader-smoke/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/test-support/remote-mock/package.json b/packages/test-support/remote-mock/package.json index f57dac7e8e..e5e8f84cc3 100644 --- a/packages/test-support/remote-mock/package.json +++ b/packages/test-support/remote-mock/package.json @@ -38,6 +38,9 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ] } diff --git a/packages/test-support/session-snapshot/package.json b/packages/test-support/session-snapshot/package.json index 93d4617c35..c78b6af406 100644 --- a/packages/test-support/session-snapshot/package.json +++ b/packages/test-support/session-snapshot/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/test-support/tool-testkit/package.json b/packages/test-support/tool-testkit/package.json index 7d27243823..e1de169ce0 100644 --- a/packages/test-support/tool-testkit/package.json +++ b/packages/test-support/tool-testkit/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/todo/tool-todo/package.json b/packages/todo/tool-todo/package.json index 0235cbf253..ff7ade870e 100644 --- a/packages/todo/tool-todo/package.json +++ b/packages/todo/tool-todo/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/typert/generator/README.i18n.yaml b/packages/typert/generator/README.i18n.yaml index f0ae35ad12..ae37550ce3 100644 --- a/packages/typert/generator/README.i18n.yaml +++ b/packages/typert/generator/README.i18n.yaml @@ -45,8 +45,8 @@ en: a844aafcafbc27b6 zh: 8efe7d472361bbc2 /deepseek-ai-dsh-typert-generator/understand-the-implementation/emission-and-publication-contract: - en: 2f6f72eecffc33c2 - zh: ded33dbc1d9a4ea5 + en: 0b8a7adb91f66d26 + zh: 09565b09a6de5310 /deepseek-ai-dsh-typert-generator/understand-the-implementation/catalog-projection: en: e85b521a1e01ab2c zh: 4416dca569de0f61 diff --git a/packages/typert/generator/README.md b/packages/typert/generator/README.md index 1a33a22a2b..9ec370d5d1 100644 --- a/packages/typert/generator/README.md +++ b/packages/typert/generator/README.md @@ -113,7 +113,7 @@ Host and Client are independent TypeScript programs. Direct project references e ### Emission and publication contract -`FaceModelEmitter` emits executable JavaScript containing success-cached Zod schema factories and the `TYPERT` contribution, plus a declaration file whose factories return `z.ZodType` through the package's public export; unsupported Zod projections fail. The Host face with Remote methods additionally emits `typert.remote-client.*` projections of Host Remote contracts for the Client. `WorkspaceTypertGenerator` validates each contributor's `package.json`: `./typert` and `./client/typert` (and `./remote` when Remote methods exist) must point at the exact generated files, and the `files` list must include them. +`FaceModelEmitter` emits executable JavaScript containing success-cached Zod schema factories and the `TYPERT` contribution, plus a declaration file whose factories return `z.ZodType` through the package's public export; unsupported Zod projections fail. The Host face with Remote methods additionally emits `typert.remote-client.*` projections of Host Remote contracts for the Client, including the declaration map its generated declaration references. `WorkspaceTypertGenerator` validates each contributor's `package.json`: `./typert` and `./client/typert` (and `./remote` when Remote methods exist) must point at the exact generated files, and the `files` list must include them. [Unary binary results](../protocol/README.md) are recognized after generic type resolution. Their codecs validate the byte-array type and JSON metadata without iterating, copying, or freezing the byte payload; generated Client declarations retain the authored metadata and narrow the byte backing to `ArrayBuffer`. diff --git a/packages/typert/generator/README.zh.md b/packages/typert/generator/README.zh.md index 536eb139af..b441561e92 100644 --- a/packages/typert/generator/README.zh.md +++ b/packages/typert/generator/README.zh.md @@ -113,7 +113,7 @@ Host 与 Client 是两个独立的 TypeScript 程序。直接项目引用确定 ### 生成与发布约定 -`FaceModelEmitter` 输出包含只缓存成功结果的 Zod schema factory 与 `TYPERT` 贡献的可执行 JavaScript,以及把 factory 通过包的公开导出标注为返回 `z.ZodType` 的声明文件;不支持的 Zod 投影会失败。含 Remote 方法的 Host face 还会额外为 Client 生成 Host Remote 约定的 `typert.remote-client.*` 投影。`WorkspaceTypertGenerator` 校验每个贡献方的 `package.json`:`./typert` 与 `./client/typert`(存在 Remote 方法时还有 `./remote`)必须指向精确的生成文件,且 `files` 清单必须包含它们。 +`FaceModelEmitter` 输出包含只缓存成功结果的 Zod schema factory 与 `TYPERT` 贡献的可执行 JavaScript,以及把 factory 通过包的公开导出标注为返回 `z.ZodType` 的声明文件;不支持的 Zod 投影会失败。含 Remote 方法的 Host face 还会额外为 Client 生成 Host Remote 约定的 `typert.remote-client.*` 投影,其中包括生成声明所引用的声明映射。`WorkspaceTypertGenerator` 校验每个贡献方的 `package.json`:`./typert` 与 `./client/typert`(存在 Remote 方法时还有 `./remote`)必须指向精确的生成文件,且 `files` 清单必须包含它们。 [一元二进制结果](../protocol/README.zh.md)在泛型类型解析后被识别。其 codec 校验字节数组类型与 JSON 元数据,不遍历、复制或冻结字节载荷;生成的 Client 声明保留原有元数据类型,并将字节的底层缓冲区收窄为 `ArrayBuffer`。 diff --git a/packages/typert/generator/package.json b/packages/typert/generator/package.json index 9f0ee2cd0a..fb276c98bb 100644 --- a/packages/typert/generator/package.json +++ b/packages/typert/generator/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/typert/generator/src/workspace.ts b/packages/typert/generator/src/workspace.ts index a12b7475c1..ff17c9ea40 100644 --- a/packages/typert/generator/src/workspace.ts +++ b/packages/typert/generator/src/workspace.ts @@ -146,12 +146,13 @@ export class WorkspaceTypertGenerator { const remoteActual = manifest.exports !== null && typeof manifest.exports === 'object' ? (manifest.exports as Record)['./remote'] : undefined - // The declaration map is emitted beside these two but never published: it - // serves editor navigation in the workspace, where the package link - // resolves its source. + // The generated declaration carries a `sourceMappingURL`, and the payload + // publishes that map beside the `src` it resolves, so an installed consumer + // navigates from the Remote method to the Host implementation. const remoteFiles = [ 'lib/typert.remote-client.js', 'lib/typert.remote-client.d.ts', + 'lib/typert.remote-client.d.ts.map', ] if (artifact.remote === undefined) { if (remoteActual !== undefined || remoteFiles.some(file => files.includes(file))) { diff --git a/packages/typert/generator/tests/fixtures/remote-model/packages/remote/package.json b/packages/typert/generator/tests/fixtures/remote-model/packages/remote/package.json index bfd57762df..b7e0631a0a 100644 --- a/packages/typert/generator/tests/fixtures/remote-model/packages/remote/package.json +++ b/packages/typert/generator/tests/fixtures/remote-model/packages/remote/package.json @@ -18,6 +18,7 @@ "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map" ] } diff --git a/packages/typert/loader/package.json b/packages/typert/loader/package.json index e6b67a822b..9c882553cd 100644 --- a/packages/typert/loader/package.json +++ b/packages/typert/loader/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/typert/protocol/package.json b/packages/typert/protocol/package.json index c2f5382d80..4f00323188 100644 --- a/packages/typert/protocol/package.json +++ b/packages/typert/protocol/package.json @@ -32,7 +32,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/typert/registry/package.json b/packages/typert/registry/package.json index 818962618a..f67e19a064 100644 --- a/packages/typert/registry/package.json +++ b/packages/typert/registry/package.json @@ -49,7 +49,10 @@ "lib/client.browser.js", "lib/client.node.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/util/atomic-write/package.json b/packages/util/atomic-write/package.json index 13837058e8..5082761022 100644 --- a/packages/util/atomic-write/package.json +++ b/packages/util/atomic-write/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/brand/package.json b/packages/util/brand/package.json index 6bd24aaa20..382fdb6f7e 100644 --- a/packages/util/brand/package.json +++ b/packages/util/brand/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/chunked-list/package.json b/packages/util/chunked-list/package.json index 21ada6100d..b43d17fcc4 100644 --- a/packages/util/chunked-list/package.json +++ b/packages/util/chunked-list/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/code-language/package.json b/packages/util/code-language/package.json index 88e9792b76..b5f435143f 100644 --- a/packages/util/code-language/package.json +++ b/packages/util/code-language/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/crypto/package.json b/packages/util/crypto/package.json index 350fb3cd41..3631539a9d 100644 --- a/packages/util/crypto/package.json +++ b/packages/util/crypto/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/deque/package.json b/packages/util/deque/package.json index 703e10951a..eec9f1f010 100644 --- a/packages/util/deque/package.json +++ b/packages/util/deque/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/file-drag/package.json b/packages/util/file-drag/package.json index 11c011938e..02d9ab64a6 100644 --- a/packages/util/file-drag/package.json +++ b/packages/util/file-drag/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/home-paths/package.json b/packages/util/home-paths/package.json index 576592ecac..4fcbc14c38 100644 --- a/packages/util/home-paths/package.json +++ b/packages/util/home-paths/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/http-proxy/package.json b/packages/util/http-proxy/package.json index c62430592e..a9fe5b644e 100644 --- a/packages/util/http-proxy/package.json +++ b/packages/util/http-proxy/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/launch-environment/package.json b/packages/util/launch-environment/package.json index ce042a0529..239ab7a30c 100644 --- a/packages/util/launch-environment/package.json +++ b/packages/util/launch-environment/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/lazy-require/package.json b/packages/util/lazy-require/package.json index 6934f6829c..afc89c0077 100644 --- a/packages/util/lazy-require/package.json +++ b/packages/util/lazy-require/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/native-command/package.json b/packages/util/native-command/package.json index b1c80a028c..910f6d54dd 100644 --- a/packages/util/native-command/package.json +++ b/packages/util/native-command/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/official-bundles/package.json b/packages/util/official-bundles/package.json index 2e58631ced..f3d2d810ca 100644 --- a/packages/util/official-bundles/package.json +++ b/packages/util/official-bundles/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/util/output-retention/package.json b/packages/util/output-retention/package.json index d6ce1f1e83..baa02ba29a 100644 --- a/packages/util/output-retention/package.json +++ b/packages/util/output-retention/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/package-manifest/package.json b/packages/util/package-manifest/package.json index 1881e3796e..45c4610125 100644 --- a/packages/util/package-manifest/package.json +++ b/packages/util/package-manifest/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/plugin-detail/package.json b/packages/util/plugin-detail/package.json index 92ca0c6fa4..9a3dc420a2 100644 --- a/packages/util/plugin-detail/package.json +++ b/packages/util/plugin-detail/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/plugin-market-index/package.json b/packages/util/plugin-market-index/package.json index 5473b02f46..ecae38802b 100644 --- a/packages/util/plugin-market-index/package.json +++ b/packages/util/plugin-market-index/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/util/time/package.json b/packages/util/time/package.json index 3bc93a0806..daac42a40c 100644 --- a/packages/util/time/package.json +++ b/packages/util/time/package.json @@ -24,7 +24,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "dependencies": { diff --git a/packages/util/timeout/package.json b/packages/util/timeout/package.json index f2b79c1353..87e501ecba 100644 --- a/packages/util/timeout/package.json +++ b/packages/util/timeout/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/values/package.json b/packages/util/values/package.json index 50e787928c..4c7297600c 100644 --- a/packages/util/values/package.json +++ b/packages/util/values/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/util/workspace-path/package.json b/packages/util/workspace-path/package.json index 3ea2a2f96a..b7b63327f1 100644 --- a/packages/util/workspace-path/package.json +++ b/packages/util/workspace-path/package.json @@ -23,7 +23,10 @@ }, "files": [ "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/web/tool-web/package.json b/packages/web/tool-web/package.json index 27485be40c..51b11af6bd 100644 --- a/packages/web/tool-web/package.json +++ b/packages/web/tool-web/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/web/web-deepseek-api/package.json b/packages/web/web-deepseek-api/package.json index 185a5dcffb..1c9209b89c 100644 --- a/packages/web/web-deepseek-api/package.json +++ b/packages/web/web-deepseek-api/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/web/web-fetch-http/package.json b/packages/web/web-fetch-http/package.json index 8c015c02e4..e0652e2291 100644 --- a/packages/web/web-fetch-http/package.json +++ b/packages/web/web-fetch-http/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/web/web-search-deepseek/package.json b/packages/web/web-search-deepseek/package.json index f8ad2ac357..cf3d5b11ec 100644 --- a/packages/web/web-search-deepseek/package.json +++ b/packages/web/web-search-deepseek/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/web/web/package.json b/packages/web/web/package.json index 895c0df0a7..93ce48d033 100644 --- a/packages/web/web/package.json +++ b/packages/web/web/package.json @@ -39,10 +39,14 @@ "lib/index.js", "lib/types/**/*.js", "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", "lib/typert.host.js", "lib/typert.host.d.ts", "lib/typert.remote-client.js", - "lib/typert.remote-client.d.ts" + "lib/typert.remote-client.d.ts", + "lib/typert.remote-client.d.ts.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/workflow/tool-workflow/package.json b/packages/workflow/tool-workflow/package.json index da90acdd53..0be68630b7 100644 --- a/packages/workflow/tool-workflow/package.json +++ b/packages/workflow/tool-workflow/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/workflow/workflow-ptc/package.json b/packages/workflow/workflow-ptc/package.json index 45a90f0d97..14edecc94b 100644 --- a/packages/workflow/workflow-ptc/package.json +++ b/packages/workflow/workflow-ptc/package.json @@ -25,7 +25,10 @@ "files": [ "locale/*.json", "lib/index.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/workflow/workflow/package.json b/packages/workflow/workflow/package.json index e3a73d34e5..1d74098cf2 100644 --- a/packages/workflow/workflow/package.json +++ b/packages/workflow/workflow/package.json @@ -28,7 +28,10 @@ "files": [ "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/packages/workspace/workspace/package.json b/packages/workspace/workspace/package.json index 486b7d69cf..cbf421f847 100644 --- a/packages/workspace/workspace/package.json +++ b/packages/workspace/workspace/package.json @@ -30,7 +30,10 @@ "locale/*.json", "lib/index.js", "lib/types/**/*.js", - "lib/types/**/*.d.ts" + "lib/types/**/*.d.ts", + "lib/types/**/*.d.ts.map", + "lib/**/*.js.map", + "src" ], "license": "MIT", "peerDependencies": { diff --git a/scripts/build-exe-for-python-sdk.ts b/scripts/build-exe-for-python-sdk.ts index a43859cebd..56bbbb349f 100644 --- a/scripts/build-exe-for-python-sdk.ts +++ b/scripts/build-exe-for-python-sdk.ts @@ -70,6 +70,13 @@ const ASSET_GLOBS = [ 'node_modules/@deepseek-ai/dsh-sandbox-windows-acl/assets/**/*', ] +/** Published source and documentation: types and maps already describe the runtime, so no load path needs them. */ +const PUBLISHED_PAYLOAD_IGNORES = [ + '**/node_modules/@deepseek-ai/dsh/src/**', + '**/node_modules/@deepseek-ai/dsh-*/src/**', + '**/node_modules/@deepseek-ai/dsh/docs/**', +] + const PLATFORMS = ['linux', 'macos', 'win'] as const const ARCHES = ['x64', 'arm64'] as const type Platform = (typeof PLATFORMS)[number] @@ -341,6 +348,7 @@ class SingleExeBuild { const sourceModules = join(root, 'node_modules').replaceAll('\\', '/') const patch = { bin: ENTRY_BIN, pkg: { assets: ASSET_GLOBS, ignore: [ ...OFFICE_ASSET_IGNORES, + ...PUBLISHED_PAYLOAD_IGNORES, `${sourceModules}/**`, `${sourceModules}/.pnpm/**`, ...['packages', 'apps', 'vendor', 'native', 'scripts'].map(directory => `${join(root, directory).replaceAll('\\', '/')}/**`), `${root.replaceAll('\\', '/')}/tsconfig*.json`, diff --git a/scripts/check-workspace-constraints.spec.ts b/scripts/check-workspace-constraints.spec.ts index fedbe7cdfa..a06ff702c2 100644 --- a/scripts/check-workspace-constraints.spec.ts +++ b/scripts/check-workspace-constraints.spec.ts @@ -313,16 +313,16 @@ describe('package payload constraints', () => { [{ import: './art/icon.svg', default: './art/fallback.svg' }, ['art/icon.svg', 'art/fallback.svg']], [['./art/icon.svg', './art/icon.svg'], ['art/icon.svg']], ] as const)('includes exported icon targets in the canonical payload: %j', (icon, expected) => { - expect(expectedDshPackageFiles({ exports: { './icon': icon } })).toEqual([...expected, 'lib/index.js', 'lib/types/**/*.d.ts']) + expect(expectedDshPackageFiles({ exports: { './icon': icon } })).toEqual([...expected, 'lib/index.js', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src']) }) it.each(['icon.svg', './icon.svg'])('includes and deduplicates manifest icon %s', (icon) => { - expect(expectedDshPackageFiles({ icon, exports: { './icon': './icon.svg' } })).toEqual(['icon.svg', 'lib/index.js', 'lib/types/**/*.d.ts']) + expect(expectedDshPackageFiles({ icon, exports: { './icon': './icon.svg' } })).toEqual(['icon.svg', 'lib/index.js', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src']) }) it('includes manifest, root, and subpath icon targets', () => { expect(expectedDshPackageFiles({ icon: './legacy.svg', exports: { './icon': './fallback.svg', './search/icon': './search.svg' } })).toEqual([ - 'legacy.svg', 'fallback.svg', 'search.svg', 'lib/index.js', 'lib/types/**/*.d.ts', + 'legacy.svg', 'fallback.svg', 'search.svg', 'lib/index.js', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src', ]) }) @@ -343,7 +343,7 @@ describe('package payload constraints', () => { { exports: { './search/locale/*.json': './z/*.json', './locale/*.json': './a/*.json' }, resources: ['a/*.json', 'z/*.json'] }, ])('includes declared locale resources in the canonical payload: $exports', ({ exports, resources }) => { expect(expectedDshPackageFiles({ name: '@deepseek-ai/dsh-localized', exports })).toEqual([ - ...resources, 'lib/index.js', 'lib/types/**/*.d.ts', + ...resources, 'lib/index.js', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src', ]) }) @@ -381,7 +381,7 @@ describe('package payload constraints', () => { const detailFiles = detailDocumentFiles(dir) expect(detailFiles).toEqual(['docs']) expect(expectedDshPackageFiles({ exports: { './locale/*.json': './locale/*.json' } }, detailFiles)).toEqual([ - 'locale/*.json', 'docs', 'lib/index.js', 'lib/types/**/*.d.ts', + 'locale/*.json', 'docs', 'lib/index.js', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src', ]) }) @@ -422,7 +422,7 @@ describe('package payload constraints', () => { './locale/zh.json': null, './locale/fr.json': { types: './locale/fr.d.ts' }, }, - })).toEqual(['lib/index.js', 'lib/types/**/*.d.ts']) + })).toEqual(['lib/index.js', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src']) }) it.each(['team/agent-team', 'experimental/voice-input-bundle', 'experimental/auto-review', 'client/ui-agent-team', 'team/tool-agent-team'])( @@ -460,6 +460,9 @@ describe('package payload constraints', () => { 'lib/index.js', 'cordis.patch.yml', 'lib/types/**/*.d.ts', + 'lib/types/**/*.d.ts.map', + 'lib/**/*.js.map', + 'src', ]) expect(expectedDshPackageFiles({ name: '@deepseek-ai/dsh-private-profile', @@ -469,6 +472,9 @@ describe('package payload constraints', () => { 'cordis.patch.yml', 'layers/web.patch.yml', 'lib/types/**/*.d.ts', + 'lib/types/**/*.d.ts.map', + 'lib/**/*.js.map', + 'src', ]) }) @@ -492,6 +498,7 @@ describe('package payload constraints', () => { }, })).toEqual([ 'lib/index.js', 'lib/client.js', 'lib/client.node.js', 'lib/assets', 'lib/loader.js', 'lib/types/**/*.d.ts', + 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src', ]) }) @@ -502,7 +509,7 @@ describe('package payload constraints', () => { { './assets/extra': './lib/assets/*' }, ])('does not publish package assets without the exact asset export target: %j', (assets) => { expect(expectedDshPackageFiles({ exports: { './client': './lib/client.js', ...assets } })) - .toEqual(['lib/index.js', 'lib/client.js', 'lib/types/**/*.d.ts']) + .toEqual(['lib/index.js', 'lib/client.js', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src']) }) it('rejects a package-asset export whose payload omits the built assets', () => { @@ -517,7 +524,7 @@ describe('package payload constraints', () => { './client': { types: './lib/types/client/index.d.ts', default: './lib/client.js' }, './assets/*': './lib/assets/*', }, - files: ['lib/index.js', 'lib/client.js', 'lib/assets', 'lib/types/**/*.d.ts'], + files: ['lib/index.js', 'lib/client.js', 'lib/assets', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src'], peerDependencies: { '@deepseek-ai/cordis': 'workspace:~' }, devDependencies: { '@deepseek-ai/cordis': 'workspace:~' }, } satisfies WorkspaceManifest['manifest'] @@ -526,7 +533,7 @@ describe('package payload constraints', () => { expect(payloadErrors(manifest)).toEqual([]) expect(payloadErrors({ ...manifest, files: manifest.files.filter(file => file !== 'lib/assets') })).toEqual([ expect.stringContaining('@deepseek-ai/dsh-client-probe: package.json files must be ' - + '["lib/index.js","lib/client.js","lib/assets","lib/types/**/*.d.ts"]'), + + '["lib/index.js","lib/client.js","lib/assets","lib/types/**/*.d.ts","lib/types/**/*.d.ts.map","lib/**/*.js.map","src"]'), ]) }) @@ -546,7 +553,7 @@ it('publishes CLI runtime declarations and rejects a payload that omits them', ( const manifest = JSON.parse(readFileSync(new URL('../apps/cli/package.json', import.meta.url), 'utf8')) as WorkspaceManifest['manifest'] expect(checkWorkspaceManifest({ dir: 'apps/cli', manifest })).toEqual([]) expect(checkWorkspaceManifest({ dir: 'apps/cli', manifest: { ...manifest, files: ['lib/*.js'] } })) - .toEqual([expect.stringContaining('@deepseek-ai/dsh: package.json files must be ["lib/*.js","lib/types/*.d.ts"]')]) + .toEqual([expect.stringContaining('@deepseek-ai/dsh: package.json files must be ["lib/*.js","lib/*.js.map","lib/types/*.d.ts","lib/types/*.d.ts.map","docs","src"]')]) }) it('requires the shared Web injection entry in the published payload', () => { @@ -626,7 +633,7 @@ it('requires the OAR license while rejecting unrelated payload files', () => { const manifest = JSON.parse(readFileSync(new URL(`../${dir}/package.json`, import.meta.url), 'utf8')) as WorkspaceManifest['manifest'] const files = [ 'icon.svg', 'locale/*.json', 'lib/index.js', - 'LICENSE-OAR', 'lib/types/**/*.d.ts', + 'LICENSE-OAR', 'lib/types/**/*.d.ts', 'lib/types/**/*.d.ts.map', 'lib/**/*.js.map', 'src', ] expect(expectedDshPackageFiles(manifest)).toEqual(files) expect(checkWorkspaceManifest({ dir, manifest })).toEqual([]) diff --git a/scripts/check-workspace-constraints.ts b/scripts/check-workspace-constraints.ts index 820e980102..5356dba419 100644 --- a/scripts/check-workspace-constraints.ts +++ b/scripts/check-workspace-constraints.ts @@ -18,7 +18,7 @@ import { LEGACY_PREFIXED_EXPERIMENTAL_PACKAGE_DIRECTORIES, PRIVATE_EXPERIMENTAL_PACKAGE_DIRECTORIES, } from './experimental-package-policy.ts' -import { hasTypertRemoteNavigation, isForbiddenPublicationFile } from './publication-payload.ts' +import { hasTypertRemoteNavigation } from './publication-payload.ts' import type { DshBundleManifest } from '../packages/util/package-manifest/src/types.ts' import { detailPath } from '../packages/util/plugin-detail/src/document.ts' import { bundlePatchFiles } from '../packages/boot/app-boot/src/profile.ts' @@ -57,10 +57,6 @@ const publicNativePackages = new Set([ '@deepseek-ai/node-addon-system-linux-arm64', '@deepseek-ai/node-addon-system-linux-x64', ]) -/** Deliberate source payloads whose exact bytes are part of the package's audit surface. */ -const publicationSourceAllowlist: Readonly> = { - '@deepseek-ai/node-addon-system': ['src/main.c', 'src/flock.c'], -} /** Public source home recorded in maintained package manifests. */ const publishedRepositoryUrl = 'git+https://github.com/deepseek-ai/deepseek-harness.git' /** Packages that participate in the experimental policy. */ @@ -79,14 +75,15 @@ const standardReleaseMemberDirectory = new RegExp( const desktopApplicationDirectory = 'apps/desktop' const localArtifactDirs = new Set(['node_modules']) const appPackageFiles: Readonly> = { - '@deepseek-ai/dsh': ['lib/*.js', 'lib/types/*.d.ts'], + // Only `prepack` stages `docs`; every other reader of this directory sees + // whatever the checkout holds. + '@deepseek-ai/dsh': ['lib/*.js', 'lib/*.js.map', 'lib/types/*.d.ts', 'lib/types/*.d.ts.map', 'docs', 'src'], '@deepseek-ai/dsh-desktop-host': [ 'lib/index.js', 'lib/cli.js', ], - // Sourcemaps stay out by payload policy; the worker-preview surface - // (dist/preview.html and dist/preview/) backs opt-in experimental - // packages and is not published. - '@deepseek-ai/dsh-web-frontend': ['dist', '!dist/**/*.map', '!dist/preview.html', '!dist/preview'], + // The worker-preview surface (dist/preview.html and dist/preview/) backs + // opt-in experimental packages and is not published. + '@deepseek-ai/dsh-web-frontend': ['dist', '!dist/preview.html', '!dist/preview', 'src'], } /** The subset of package.json fields this constraint check cares about. */ @@ -364,6 +361,13 @@ export function expectedDshPackageFiles(manifest: PackageManifest, detailFiles: // declarations. ...usesEmittedTreeDefaults(manifest) ? ['lib/types/**/*.js'] : [], 'lib/types/**/*.d.ts', + // A published declaration map plus `src` lets a consumer editor open the + // implementation behind an exported declaration, and lets a plugin author + // read it without a repository checkout. + 'lib/types/**/*.d.ts.map', + // Every emitted map ships beside the JavaScript it describes, so a stack + // frame or a debugger session resolves into the published `src`. + 'lib/**/*.js.map', ...hasExportPair(manifest, './typert', './lib/typert.host.d.ts', './lib/typert.host.js') ? ['lib/typert.host.js', 'lib/typert.host.d.ts'] : [], @@ -371,8 +375,11 @@ export function expectedDshPackageFiles(manifest: PackageManifest, detailFiles: ? ['lib/typert.client.js', 'lib/typert.client.d.ts'] : [], ...hasTypertRemoteNavigation(manifest) - ? ['lib/typert.remote-client.js', 'lib/typert.remote-client.d.ts'] + // The generated Remote declaration carries a `sourceMappingURL` its map + // resolves, and that map resolves the Host method through `src`. + ? ['lib/typert.remote-client.js', 'lib/typert.remote-client.d.ts', 'lib/typert.remote-client.d.ts.map'] : [], + 'src', ] } @@ -551,15 +558,6 @@ export function checkWorkspaceManifest({ dir, manifest }: WorkspaceManifest): st return errors } - if (manifest.name?.startsWith('@deepseek-ai/')) { - const allowedSources = publicationSourceAllowlist[manifest.name] ?? [] - for (const file of manifest.files ?? []) { - if (isForbiddenPublicationFile(file) && !allowedSources.includes(file)) { - errors.push(`${label}: package.json files must not publish ${JSON.stringify(file)}`) - } - } - } - if (dir.startsWith('apps/') && dir !== desktopApplicationDirectory && dir !== pluginMarketGeneratorDirectory && manifest.name?.startsWith('@deepseek-ai/')) { const expectedFiles = appPackageFiles[manifest.name] if (expectedFiles === undefined) { diff --git a/scripts/clean.ts b/scripts/clean.ts index 8d8d8e4fc1..57b87b812c 100644 --- a/scripts/clean.ts +++ b/scripts/clean.ts @@ -106,6 +106,8 @@ export class RepositoryCleaner { await this.addIfPresent(targets, join(this.root, '.dsh-build'), canonicalRoot) await this.addIfPresent(targets, join(this.root, 'apps/desktop/.desktop-build'), canonicalRoot) + // The CLI package's documentation copy: `prepack` writes it, `postpack` removes it. + await this.addIfPresent(targets, join(this.root, 'apps/cli/docs'), canonicalRoot) // These checks cover legacy root-level incremental state emitted by older configs. await this.addIfPresent(targets, join(this.root, '.typecheck'), canonicalRoot) diff --git a/scripts/client-bundle-css.spec.ts b/scripts/client-bundle-css.spec.ts index 3703a36225..1ee3b6aa9c 100644 --- a/scripts/client-bundle-css.spec.ts +++ b/scripts/client-bundle-css.spec.ts @@ -260,9 +260,10 @@ describe('client bundle package asset imports', () => { }) const output = builds.flatMap(bundle => bundle.chunks).find(chunk => chunk.type === 'chunk' && chunk.fileName === 'client.js') const code = output?.type === 'chunk' ? output.code : '' - expect(code).toContain(`require.asset(${JSON.stringify(WHALE_URL)})`) + // The minifier may print either string quote. + expect(code).toMatch(new RegExp(`require\\.asset\\(["\`]${WHALE_URL.replaceAll('.', '\\.')}["\`]\\)`)) expect(code).not.toContain('__dshPackageAsset_') - expect(code).toContain('"__dshPackageAsset("') + expect(code).toMatch(/["`]__dshPackageAsset\(["`]/) } finally { for (const bundle of builds) await bundle[Symbol.asyncDispose]() } diff --git a/scripts/client-bundle-purity.spec.ts b/scripts/client-bundle-purity.spec.ts index 817e458a46..70d9b809a3 100644 --- a/scripts/client-bundle-purity.spec.ts +++ b/scripts/client-bundle-purity.spec.ts @@ -206,8 +206,9 @@ describe('client bundle dynamic imports', () => { if (config === undefined) throw new Error('client config missing') const output = await clientChunkOutput(root, config, 'client.js') - expect(output).toContain('require.async("./client.terminal.js")') - expect(output).not.toContain('Promise.resolve().then(() => require("./client.terminal.js"))') + // The compressor rewrites string literals, so the quotes are not part of the contract. + expect(output).toMatch(/require\.async\((["'`])\.\/client\.terminal\.js\1\)/) + expect(output).not.toMatch(/Promise\.resolve\(\)\.then\(\(\)\s*=>\s*require\((["'`])\.\/client\.terminal\.js\1\)\)/) }) }) diff --git a/scripts/publication-payload.spec.ts b/scripts/publication-payload.spec.ts index 52c0e7da33..85c02d52a9 100644 --- a/scripts/publication-payload.spec.ts +++ b/scripts/publication-payload.spec.ts @@ -1,72 +1,7 @@ import { describe, expect, it } from 'vitest' -import { - hasTypertRemoteNavigation, - isForbiddenPublicationFile, - validateTarballPayload, -} from './publication-payload.ts' - -function validateFixtureTarball(files: readonly string[]): () => void { - return () => { - validateTarballPayload(files, 'fixture.tgz') - } -} - -describe('publication payload policy', () => { - it.each([ - 'lib/index.js', - 'lib/types/index.d.ts', - 'lib/styles/base.css', - ])('accepts %s', (file) => { - expect(isForbiddenPublicationFile(file)).toBe(false) - }) - - it.each([ - 'src', - './src', - 'src/', - 'src/index.ts', - './src/index.ts', - String.raw`src\index.ts`, - 'lib/types/index.d.ts.map', - './lib/types/index.d.ts.map', - 'lib/typert.remote-client.d.ts.map', - 'lib/client.js.map', - './lib/client.js.map', - ])('rejects static manifest path %s', (file) => { - expect(isForbiddenPublicationFile(file)).toBe(true) - }) - - it('rejects source members in packed tarballs', () => { - expect(validateFixtureTarball([ - 'package/package.json', - 'package/src/index.ts', - ])).toThrow('fixture.tgz publishes source file package/src/index.ts') - }) - - it('rejects source maps in packed tarballs', () => { - expect(validateFixtureTarball([ - 'package/package.json', - 'package/lib/types/index.d.ts.map', - ])).toThrow('fixture.tgz publishes source map package/lib/types/index.d.ts.map') - expect(validateFixtureTarball([ - 'package/package.json', - 'package/lib/typert.remote-client.d.ts.map', - ])).toThrow('fixture.tgz publishes source map package/lib/typert.remote-client.d.ts.map') - expect(validateFixtureTarball([ - 'package/package.json', - 'package/lib/client.js.map', - ])).toThrow('fixture.tgz publishes source map package/lib/client.js.map') - }) - - it('accepts a clean packed tarball', () => { - expect(validateFixtureTarball([ - 'package/package.json', - 'package/lib/index.js', - 'package/lib/types/index.d.ts', - 'package/lib/styles/base.css', - ])).not.toThrow() - }) +import { hasTypertRemoteNavigation } from './publication-payload.ts' +describe('publication payload facts', () => { it('recognizes only the canonical Host-for-Client export pair', () => { expect(hasTypertRemoteNavigation({ exports: { @@ -77,5 +12,7 @@ describe('publication payload policy', () => { }, })).toBe(true) expect(hasTypertRemoteNavigation({ exports: { './remote': './lib/remote.js' } })).toBe(false) + expect(hasTypertRemoteNavigation({ exports: { './remote': { types: './lib/typert.remote-client.d.ts' } } })).toBe(false) + expect(hasTypertRemoteNavigation(undefined)).toBe(false) }) }) diff --git a/scripts/publication-payload.ts b/scripts/publication-payload.ts index 4ff8e6f05d..6d61f51145 100644 --- a/scripts/publication-payload.ts +++ b/scripts/publication-payload.ts @@ -1,4 +1,4 @@ -/** Publication payload policy shared by static manifests and packed tarballs. */ +/** Publication payload facts shared by static manifests and packed tarballs. */ /** * Whether a package manifest exports generated Host-for-Client metadata. @@ -15,41 +15,3 @@ export function hasTypertRemoteNavigation(manifest: unknown): boolean { return entry.types === './lib/typert.remote-client.d.ts' && entry.default === './lib/typert.remote-client.js' } - -/** Normalize a package manifest path or npm tarball member to its payload-relative path. */ -function payloadPath(file: string): string { - const normalized = file.replaceAll('\\', '/').replace(/^\.\/+/, '').replace(/\/+$/, '') - return normalized.startsWith('package/') ? normalized.slice('package/'.length) : normalized -} - -/** - * Whether a package payload path exposes source or map intermediates. Maps - * serve editor navigation during development, where a workspace consumer - * resolves their source through the package link; a published map resolves - * nothing, so no payload publishes one. - * @param file - manifest path or tarball member to classify. - * @returns whether publishing this path is forbidden. - */ -export function isForbiddenPublicationFile(file: string): boolean { - const normalized = payloadPath(file) - return normalized === 'src' - || normalized.startsWith('src/') - || normalized.endsWith('.d.ts.map') - || normalized.endsWith('.js.map') -} - -/** - * Reject source and map members in a packed npm tarball. - * @param files - tarball members to validate. - * @param context - tarball identity named in the failure. - */ -export function validateTarballPayload(files: readonly string[], context: string): void { - for (const file of files) { - if (!isForbiddenPublicationFile(file)) continue - const normalized = payloadPath(file) - if (normalized === 'src' || normalized.startsWith('src/')) { - throw new Error(`${context} publishes source file ${file}`) - } - throw new Error(`${context} publishes source map ${file}`) - } -} diff --git a/scripts/publish-npm-baseline.ts b/scripts/publish-npm-baseline.ts index baf51cb112..c37c9dfde5 100644 --- a/scripts/publish-npm-baseline.ts +++ b/scripts/publish-npm-baseline.ts @@ -18,7 +18,6 @@ import { createInterface } from 'node:readline/promises' import { pathToFileURL } from 'node:url' import { parseArgs } from 'node:util' import { discoverNpmBaselineManifests } from './npm-baseline-packages.ts' -import { validateTarballPayload } from './publication-payload.ts' const DEFAULT_REGISTRY = 'https://registry.npm.harnessment.com' const DEFAULT_OUTPUT_DIRECTORY = '.artifacts/npm-baseline' @@ -317,9 +316,6 @@ class ReleaseBundle { if (expected === undefined || !missingNames.delete(artifact.name)) { throw new Error(`unexpected or duplicate packed package: ${artifact.name}`) } - if (expected.origin === 'harness') { - validateTarballPayload(artifact.files, tarball) - } if (artifact.version !== version) { throw new Error(`${tarball} has version ${artifact.version}; expected ${version}`) } @@ -393,9 +389,6 @@ class ReleaseBundle { throw new Error(`tarball checksum mismatch: ${pkg.tarball}`) } const artifact = inspectTarball(path, runner) - if (pkg.origin === 'harness') { - validateTarballPayload(artifact.files, pkg.tarball) - } if (artifact.name !== pkg.name || artifact.version !== this.manifest.version) { throw new Error(`tarball identity mismatch: ${pkg.tarball}`) } diff --git a/scripts/release/families.spec.ts b/scripts/release/families.spec.ts index 71ae9a38cb..b90a2456f3 100644 --- a/scripts/release/families.spec.ts +++ b/scripts/release/families.spec.ts @@ -398,18 +398,32 @@ describe('release families', () => { ]) }) - it('applies the harness payload policy to dsh and keeps upstream payloads for vendored packages', () => { + it('accepts the harness payload and keeps upstream payloads for vendored packages', () => { const dsh = releaseFamily('dsh') const vendor = releaseFamily('vendor') const harness = member('packages/a/library', '@deepseek-ai/dsh-library') const vendored = member('vendor/cordis', '@deepseek-ai/cordis') - expect(() => { dsh.validatePayload(harness, ['package/lib/index.js', 'package/src/index.ts']) }) - .toThrow(/publishes source file/) + expect(() => { dsh.validatePayload(harness, ['package/lib/index.js', 'package/lib/index.js.map', 'package/src/index.ts']) }).not.toThrow() expect(() => { vendor.validatePayload(vendored, ['package/lib/index.js', 'package/src/index.ts']) }).not.toThrow() expect(() => { vendor.validatePayload(vendored, []) }).toThrow(/empty tarball/) }) + it('requires the installed package payload the staging hook supplies', () => { + const dsh = releaseFamily('dsh') + const installed = member('apps/cli', '@deepseek-ai/dsh') + + expect(() => { dsh.validatePayload(installed, ['package/lib/index.js', 'package/src/bin.ts']) }) + .toThrow(/@deepseek-ai\/dsh packed no documentation/) + expect(() => { dsh.validatePayload(installed, ['package/lib/index.js', 'package/docs/guide.md', 'package/src/bin.ts']) }) + .toThrow(/@deepseek-ai\/dsh packed no upgrade guide index/) + const docs = ['package/docs/guide.md', 'package/docs/upgrade-guide/README.md'] + expect(() => { dsh.validatePayload(installed, ['package/lib/index.js', ...docs]) }) + .toThrow(/@deepseek-ai\/dsh packed no source/) + expect(() => { dsh.validatePayload(installed, ['package/lib/index.js', ...docs, 'package/src/bin.ts']) }) + .not.toThrow() + }) + it('drives the installed entry only for the family that publishes one', () => { expect(releaseFamily('dsh').installedEntry).toEqual({ packageName: '@deepseek-ai/dsh', binPath: 'lib/bin.js' }) expect(releaseFamily('vendor').installedEntry).toBeUndefined() diff --git a/scripts/release/families.ts b/scripts/release/families.ts index bd6ddbe5dd..cf5e4ca9d3 100644 --- a/scripts/release/families.ts +++ b/scripts/release/families.ts @@ -15,7 +15,6 @@ import { officialClientBuildEnvironment, readClientBuildRecord, } from '../client-build-environment.ts' -import { validateTarballPayload } from '../publication-payload.ts' import { ON_DEMAND_BUNDLES } from '../../packages/util/official-bundles/src/bundles.ts' /** @@ -387,12 +386,24 @@ class DshFamily extends ReleaseFamily { } /** - * Reject source and declaration-map members, the repository's publication policy. + * Require the installed package to carry the documentation and source its + * manifest promises. `docs` exists only because `prepack` stages it, and a + * stale tree in the checkout would satisfy a weaker check, so the staged + * copy must be complete for the pack that publishes it. * @param member - the packed member. * @param files - every path inside its tarball. */ validatePayload(member: ReleaseMember, files: readonly string[]): void { - validateTarballPayload(files, member.name) + if (member.name !== this.installedEntry.packageName) return + if (!files.some(file => file.startsWith('package/docs/') && file.endsWith('.md'))) { + throw new Error(`${member.name} packed no documentation`) + } + if (!files.includes('package/docs/upgrade-guide/README.md')) { + throw new Error(`${member.name} packed no upgrade guide index`) + } + if (!files.some(file => file.startsWith('package/src/') && file.endsWith('.ts'))) { + throw new Error(`${member.name} packed no source`) + } } /** Publish every advertised on-demand package before the installation that offers it. */ @@ -446,14 +457,12 @@ class VendorFamily extends ReleaseFamily { } /** - * Require the payload the vendored manifest declares, including upstream's - * `src` tree and declaration maps. + * Accept upstream's payload. * - * The harness policy that rejects both does not apply here: these manifests - * export `./src/*` for source navigation, so dropping `src` would publish a - * package whose export map points at absent files. What must hold instead is - * that every path the manifest selects is present, which `files` already - * decides and `pnpm pack` already enforces. + * Upstream's manifest owns that payload, so this family enforces no shape of + * its own beyond a nonempty tarball. What must hold is that every path the + * manifest selects is present, which `files` already decides and `pnpm pack` + * already enforces. * @param member - the packed member. * @param files - every path inside its tarball. */ diff --git a/scripts/release/pack.spec.ts b/scripts/release/pack.spec.ts index b7a102122f..48a4723512 100644 --- a/scripts/release/pack.spec.ts +++ b/scripts/release/pack.spec.ts @@ -307,16 +307,18 @@ describe('release pack CLI', () => { it('validates every parallel tarball before recording the publish order', async () => { const root = fixture() packageFixture(root, 'packages/util/alpha', '@deepseek-ai/alpha') - packageFixture(root, 'packages/util/zebra', '@deepseek-ai/zebra', { files: ['lib/index.js', 'src/index.ts'] }) - write(join(root, 'packages/util/zebra/src/index.ts'), 'export const source = 1\n') + packageFixture(root, 'apps/cli', '@deepseek-ai/dsh', { files: ['lib/index.js', 'src/bin.ts'] }) + packageFixture(root, 'packages/subagent/subagent-claude-code', '@deepseek-ai/dsh-subagent-claude-code') + packageFixture(root, 'packages/subagent/subagent-codex', '@deepseek-ai/dsh-subagent-codex') + write(join(root, 'apps/cli/src/bin.ts'), 'export const bin = 1\n') write(join(root, 'apps/web/dist/index.html'), '
') writeClientBuildRecord(root, officialClientBuildEnvironment(root, { DSH_CLIENT_COMMIT_HASH: commit })) const result = await runPack(root, ['--family', 'dsh', '--concurrency', '8']) expect(result.status).not.toBe(0) - expect(result.stderr).toContain('@deepseek-ai/zebra publishes source file package/src/index.ts') - expect(readdirSync(join(root, 'packed')).filter(name => name.endsWith('.tgz'))).toHaveLength(2) + expect(result.stderr).toContain('@deepseek-ai/dsh packed no documentation') + expect(readdirSync(join(root, 'packed')).filter(name => name.endsWith('.tgz'))).toHaveLength(4) expect(existsSync(join(root, 'packed', PUBLISH_ORDER_FILE))).toBe(false) }) diff --git a/scripts/run-gates.spec.ts b/scripts/run-gates.spec.ts index 3e3dfdca99..3c37aa5142 100644 --- a/scripts/run-gates.spec.ts +++ b/scripts/run-gates.spec.ts @@ -1004,6 +1004,7 @@ describe('Node 24 lane ownership', () => { expect.arrayContaining([ 'apps/cli/tests/profiles/headless/tests/source-tool.built.e2e.ts', 'apps/desktop/tests/acl-skill.built.e2e.ts', + 'apps/desktop/tests/installed-docs-asar.built.e2e.ts', 'packages/subprocess/subprocess-local/tests/spawn-runner-built.e2e.ts', 'packages/subagent/subagent-codex/tests/loader-composition.e2e.ts', 'packages/subagent/subagent-claude-code/tests/loader-composition.e2e.ts', diff --git a/scripts/run-gates.ts b/scripts/run-gates.ts index 5df429dae0..a8cd867c34 100644 --- a/scripts/run-gates.ts +++ b/scripts/run-gates.ts @@ -911,6 +911,7 @@ function builtBinSmokeGate(needs: string[] = ['build']): Gate { 'apps/cli/tests/profiles/headless/tests/source-tool.built.e2e.ts', 'apps/cli/tests/built-bin.e2e.ts', 'apps/desktop/tests/acl-skill.built.e2e.ts', + 'apps/desktop/tests/installed-docs-asar.built.e2e.ts', 'packages/host/directory-picker-native/tests/built-worker.e2e.ts', 'packages/sdk/server/tests/built-scope-carrier.e2e.ts', 'packages/deliverables/tool-present/tests/built-errors.e2e.ts', diff --git a/scripts/stage-dsh-docs.spec.ts b/scripts/stage-dsh-docs.spec.ts new file mode 100644 index 0000000000..c231c50fc9 --- /dev/null +++ b/scripts/stage-dsh-docs.spec.ts @@ -0,0 +1,137 @@ +import { existsSync, mkdtempSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { afterEach, describe, expect, it } from 'vitest' +import { cleanStagedDshDocs, publishedDocuments, stageDshDocs } from './stage-dsh-docs.ts' + +const roots: string[] = [] + +function temporaryRoot(): string { + const root = mkdtempSync(join(tmpdir(), 'dsh-stage-docs-')) + roots.push(root) + return root +} + +function write(root: string, path: string, contents = '# fixture\n'): void { + const target = join(root, path) + mkdirSync(join(target, '..'), { recursive: true }) + writeFileSync(target, contents) +} + +afterEach(() => { + for (const root of roots.splice(0)) rmSync(root, { recursive: true, force: true }) +}) + +describe('documentation staging', () => { + it('copies published pages, assets, and upgrade guides without the internal trees', async () => { + const source = join(temporaryRoot(), 'docs') + const destination = join(temporaryRoot(), 'cli', 'docs') + const published = new Set(['guide/index.md', 'guide/index.zh.md']) + write(source, 'guide/index.md') + write(source, 'guide/index.zh.md') + write(source, 'guide/index.i18n.yaml') + write(source, 'images/diagram.png', 'png') + write(source, 'upgrade-guide/v0.1.0/change/guide.md', '---\ndescription: "Change."\n---\n# Change\n') + write(source, 'upgrade-guide/v0.1.0/change/guide.zh.md', '---\ndescription: "变更。"\n---\n# 变更\n') + write(source, 'upgrade-guide/v0.1.0/change/guide.i18n.yaml') + write(source, 'postmortem/incident.md') + write(source, 'AGENTS.md') + write(source, 'persistence-changes/v1/changes.md') + write(source, 'i18n/terminology.md') + + await stageDshDocs(source, destination, published) + + for (const copied of [ + 'guide/index.md', 'guide/index.zh.md', 'images/diagram.png', + 'upgrade-guide/v0.1.0/change/guide.md', 'upgrade-guide/v0.1.0/change/guide.zh.md', 'upgrade-guide/README.md', + ]) { + expect(existsSync(join(destination, copied)), copied).toBe(true) + } + for (const excluded of [ + 'guide/index.i18n.yaml', 'upgrade-guide/v0.1.0/change/guide.i18n.yaml', + 'postmortem', 'AGENTS.md', 'persistence-changes', 'i18n', + ]) { + expect(existsSync(join(destination, excluded)), excluded).toBe(false) + } + }) + + it('indexes every staged upgrade guide by the release it upgrades from, newest first', async () => { + const source = join(temporaryRoot(), 'docs') + const destination = join(temporaryRoot(), 'cli', 'docs') + const guide = (description: string, title: string): string => `---\nkind: upgrade-guide\ndescription: "${description}"\n---\n# ${title}\n` + write(source, 'upgrade-guide/v0.2.0-rc.1/b-item/guide.md', '---\r\n# note\r\nkind: upgrade-guide\r\ndescription: >\r\n Second | change\r\n across lines.\r\n---\r\n# Second\r\n') + write(source, 'upgrade-guide/v0.2.0-rc.1/b-item/guide.zh.md', guide('第二项。', '第二')) + write(source, 'upgrade-guide/v0.2.0-rc.1/a-item/guide.md', guide('First change.', 'First')) + write(source, 'upgrade-guide/v0.2.0-rc.1/a-item/guide.zh.md', guide('第一项。', '第一')) + write(source, 'upgrade-guide/v0.10.0/c-item/guide.md', guide('Later change.', 'Later')) + write(source, 'upgrade-guide/v0.10.0/c-item/guide.zh.md', guide('后续变更。', '后续')) + + await stageDshDocs(source, destination, new Set()) + const index = readFileSync(join(destination, 'upgrade-guide/README.md'), 'utf8') + await stageDshDocs(source, destination, new Set()) + + expect(readFileSync(join(destination, 'upgrade-guide/README.md'), 'utf8')).toBe(index) + expect(index).toContain('upgrading from release vT to the release after it; vT is the release being left, not the target') + const sections = index.split('\n## ').slice(1).map(section => section.split('\n').filter(line => line.startsWith('| ') && !line.startsWith('| Item') && !line.startsWith('| ---'))) + expect(index.match(/^## .+$/gmu)).toEqual(['## v0.10.0', '## v0.2.0-rc.1']) + expect(sections).toEqual([ + ['| Later | Later change. | 后续变更。 | [v0.10.0/c-item/guide.md](v0.10.0/c-item/guide.md) | [v0.10.0/c-item/guide.zh.md](v0.10.0/c-item/guide.zh.md) |'], + [ + '| First | First change. | 第一项。 | [v0.2.0-rc.1/a-item/guide.md](v0.2.0-rc.1/a-item/guide.md) | [v0.2.0-rc.1/a-item/guide.zh.md](v0.2.0-rc.1/a-item/guide.zh.md) |', + '| Second | Second \\| change across lines. | 第二项。 | [v0.2.0-rc.1/b-item/guide.md](v0.2.0-rc.1/b-item/guide.md) | [v0.2.0-rc.1/b-item/guide.zh.md](v0.2.0-rc.1/b-item/guide.zh.md) |', + ], + ]) + }) + + it('writes a preamble-only index without guides and rejects a guide the index cannot describe', async () => { + const source = join(temporaryRoot(), 'docs') + const destination = join(temporaryRoot(), 'cli', 'docs') + write(source, 'kept.md') + await stageDshDocs(source, destination, new Set(['kept.md'])) + expect(readFileSync(join(destination, 'upgrade-guide/README.md'), 'utf8')).not.toContain('## ') + + write(source, 'upgrade-guide/v0.1.0/change/guide.md', '# Untitled summary\n') + write(source, 'upgrade-guide/v0.1.0/change/guide.zh.md', '# 无摘要\n') + await expect(stageDshDocs(source, destination, new Set())).rejects.toThrow(/needs a frontmatter description and a level-one title/) + }) + + it('publishes the generated index for the repository guides', async () => { + const destination = join(temporaryRoot(), 'cli', 'docs') + await stageDshDocs(join(import.meta.dirname, '..', 'docs'), destination) + const index = readFileSync(join(destination, 'upgrade-guide/README.md'), 'utf8') + for (const file of readdirSync(join(import.meta.dirname, '..', 'docs/upgrade-guide'), { recursive: true, encoding: 'utf8' })) { + if (file.endsWith('guide.md')) expect(index).toContain(`](${file.split('\\').join('/')})`) + } + }) + + it('replaces a previous copy instead of merging into it', async () => { + const source = join(temporaryRoot(), 'docs') + const destination = join(temporaryRoot(), 'cli', 'docs') + write(source, 'kept.md') + write(destination, 'removed.md') + + await stageDshDocs(source, destination, new Set(['kept.md'])) + + expect(existsSync(join(destination, 'kept.md'))).toBe(true) + expect(existsSync(join(destination, 'removed.md'))).toBe(false) + }) + + it('removes a staged copy', async () => { + const destination = join(temporaryRoot(), 'cli', 'docs') + write(destination, 'architecture.md') + + await cleanStagedDshDocs(destination) + + expect(existsSync(destination)).toBe(false) + }) + + it('publishes the website manifest pages and no internal document', () => { + const published = publishedDocuments() + + expect(published.has('architecture.md')).toBe(true) + expect(published.has('architecture.zh.md')).toBe(true) + for (const excluded of ['AGENTS.md', 'testing.md', 'postmortem/README.md', 'persistence-changes/README.md', 'i18n/README.md']) { + expect(published.has(excluded)).toBe(false) + } + }) +}) diff --git a/scripts/stage-dsh-docs.ts b/scripts/stage-dsh-docs.ts new file mode 100644 index 0000000000..d63483c005 --- /dev/null +++ b/scripts/stage-dsh-docs.ts @@ -0,0 +1,185 @@ +/** Stage the published documentation inside the published `dsh` package. */ + +import { cp, mkdir, readdir, readFile, rm, writeFile } from 'node:fs/promises' +import { dirname, join } from 'node:path' +import { fileURLToPath } from 'node:url' +import { JSON_SCHEMA, load as loadYaml } from 'js-yaml' +import { rcompare } from 'semver' +import { docsPages } from '../website/docs.ts' + +/** Repository root, resolved from this script rather than the invoking directory. */ +const REPOSITORY_ROOT = fileURLToPath(new URL('..', import.meta.url)) + +/** Directory whose contents are published, and the package directory that receives them. */ +const DOCS_DIRECTORY = join(REPOSITORY_ROOT, 'docs') +const STAGED_DIRECTORY = join(REPOSITORY_ROOT, 'apps', 'cli', 'docs') + +/** Generated migration records and the translation guidelines: maintainer material no reader in an installed package needs. */ +const EXCLUDED_DIRECTORIES = ['persistence-changes', 'i18n'] as const + +/** Translation alignment records the documentation gates own. */ +const EXCLUDED_SUFFIX = '.i18n.yaml' + +/** Upgrade guides reach an installed reader and are not on the website. */ +const ALWAYS_PUBLISHED_DIRECTORY = 'upgrade-guide' + +/** Generated index of the staged upgrade guides; the repository tree has none. */ +const UPGRADE_GUIDE_INDEX = `${ALWAYS_PUBLISHED_DIRECTORY}/README.md` + +/** + * Source-relative Markdown paths the documentation website publishes. + * + * The npm payload carries the same pages plus the upgrade guides, so a new + * internal document under `docs/` reaches neither surface until the manifest + * adopts it. + * @returns every manifest source and alias, relative to the documentation root. + */ +export function publishedDocuments(): ReadonlySet { + const published = new Set() + for (const page of docsPages) { + for (const file of [page.source, ...page.sourceAliases ?? []]) { + if (file.startsWith('docs/')) published.add(file.slice('docs/'.length)) + } + } + return published +} + +/** + * Replace a package's `docs` directory with the documentation a reader needs. + * + * The copy follows the working tree, so a pack publishes the `docs/` contents + * the checkout holds rather than the committed tree. Runs from the `prepack` + * lifecycle of `@deepseek-ai/dsh`, so packing the package and packing the + * release set both publish the same files. + * @param source - Documentation root to copy; defaults to the repository `docs`. + * @param destination - Package directory to replace; defaults to `apps/cli/docs`. + * @param published - Source-relative Markdown paths to keep; defaults to the website manifest. + * @returns Resolves after the destination holds the filtered copy. + */ +export async function stageDshDocs( + source: string = DOCS_DIRECTORY, + destination: string = STAGED_DIRECTORY, + published: ReadonlySet = publishedDocuments(), +): Promise { + await rm(destination, { recursive: true, force: true }) + const files = await stagedFiles(source, published) + for (const file of files) { + const target = join(destination, file) + await mkdir(dirname(target), { recursive: true }) + await cp(join(source, file), target) + } + await mkdir(join(destination, ALWAYS_PUBLISHED_DIRECTORY), { recursive: true }) + await writeFile(join(destination, UPGRADE_GUIDE_INDEX), await upgradeGuideIndex(source, files)) +} + +/** One upgrade guide pair as the generated index lists it. */ +interface IndexedGuide { + readonly item: string + readonly title: string + readonly summary: string + readonly summaryZh: string +} + +/** + * Render the index of every staged upgrade guide, grouped by the release it upgrades from. + * @param source - Documentation root holding the guides. + * @param files - Staged source-relative paths. + * @returns the index Markdown; without staged guides it holds only the preamble. + * @throws When a guide lacks its Chinese counterpart, a `description`, or a level-one title. + */ +async function upgradeGuideIndex(source: string, files: readonly string[]): Promise { + const versions = new Map() + for (const file of files) { + const match = /^upgrade-guide\/v(?[^/]+)\/(?[^/]+)\/guide\.md$/u.exec(file)?.groups + if (match?.version === undefined || match.item === undefined) continue + const { version, item } = match + const english = await guideHeading(join(source, file)) + const chinese = await guideHeading(join(source, file.replace(/\.md$/u, '.zh.md'))) + const guides = versions.get(version) ?? [] + guides.push({ item, title: english.title, summary: english.description, summaryZh: chinese.description }) + versions.set(version, guides) + } + const cell = (text: string): string => text.replace(/\s+/gu, ' ').trim().replaceAll('|', '\\|') + const lines = [ + '# Upgrade guides', + '', + 'Generated when `@deepseek-ai/dsh` is packed. A `v` section lists what to change when upgrading from release vT to the release after it; vT is the release being left, not the target. Paths are relative to this file.', + '', + '打包 `@deepseek-ai/dsh` 时生成。`v` 一节列出从 vT 版本升级到其下一个版本时需要做的修改;vT 是升级前的版本,不是目标版本。路径相对于本文件。', + ] + for (const [version, guides] of [...versions].sort(([left], [right]) => rcompare(left, right))) { + lines.push('', `## v${version}`, '', '| Item | Summary | 摘要 | English | 中文 |', '| --- | --- | --- | --- | --- |') + for (const guide of guides) { + const directory = `v${version}/${guide.item}` + lines.push(`| ${cell(guide.title)} | ${cell(guide.summary)} | ${cell(guide.summaryZh)} | [${directory}/guide.md](${directory}/guide.md) | [${directory}/guide.zh.md](${directory}/guide.zh.md) |`) + } + } + return `${lines.join('\n')}\n` +} + +/** + * Read the frontmatter description and level-one title of one guide. + * @param path - Absolute guide path. + * @returns the guide's one-sentence description and title. + * @throws When the file is missing or lacks either field. + */ +async function guideHeading(path: string): Promise<{ readonly description: string; readonly title: string }> { + const text = await readFile(path, 'utf8') + // The same frontmatter rules as `verify-upgrade-guides`; the title is the first heading after it. + const frontmatter = /^---\r?\n(?[\s\S]*?)\r?\n---\r?\n/u.exec(text) + const yaml = frontmatter?.groups?.yaml + const metadata = yaml === undefined ? undefined : loadYaml(yaml, { schema: JSON_SCHEMA }) as { description?: unknown } | null + const title = frontmatter === null ? undefined : /^# (?.+?)\r?$/mu.exec(text.slice(frontmatter[0].length))?.groups?.title + if (typeof metadata?.description !== 'string' || title === undefined) { + throw new Error(`stage-dsh-docs: ${path} needs a frontmatter description and a level-one title`) + } + return { description: metadata.description, title } +} + +/** + * Remove a staged copy, so no pack leaves a stale tree for the next one. + * @param destination - Package directory to remove; defaults to `apps/cli/docs`. + * @returns Resolves after the directory is absent. + */ +export async function cleanStagedDshDocs(destination: string = STAGED_DIRECTORY): Promise<void> { + await rm(destination, { recursive: true, force: true }) +} + +/** + * List the files one stage publishes, in stable path order. + * @param source - Documentation root to walk. + * @param published - Source-relative Markdown paths to keep. + * @returns source-relative POSIX paths of every published file. + */ +async function stagedFiles(source: string, published: ReadonlySet<string>): Promise<string[]> { + const files: string[] = [] + const walk = async (directory: string): Promise<void> => { + for (const entry of await readdir(join(source, directory), { withFileTypes: true })) { + const path = directory === '' ? entry.name : `${directory}/${entry.name}` + if (EXCLUDED_DIRECTORIES.some(excluded => path === excluded || path.startsWith(`${excluded}/`))) continue + if (entry.isDirectory()) { + await walk(path) + continue + } + if (path.endsWith(EXCLUDED_SUFFIX)) continue + if (path.endsWith('.md') && !published.has(path) && !isUpgradeGuide(path)) continue + files.push(path) + } + } + await walk('') + return files.sort() +} + +/** + * Whether one path belongs to a shipped upgrade guide. + * @param path - Source-relative documentation path. + * @returns whether the path lives under the upgrade-guide tree. + */ +function isUpgradeGuide(path: string): boolean { + return path.startsWith(`${ALWAYS_PUBLISHED_DIRECTORY}/`) +} + +if (import.meta.main) { + if (process.argv.includes('--clean')) await cleanStagedDshDocs() + else await stageDshDocs() +} diff --git a/scripts/translation-pairing.ts b/scripts/translation-pairing.ts index 04ea0e72a6..466b39d490 100644 --- a/scripts/translation-pairing.ts +++ b/scripts/translation-pairing.ts @@ -142,6 +142,7 @@ export const TRANSLATION_SCOPE_GLOB_EXCLUDES = [ '**/__pycache__/**', '**/.pytest_cache/**', 'apps/web/dist/**', + 'apps/cli/docs/**', '.artifacts/**', 'python/sdk-runtime/src/deepseek_harness_runtime/runtime/**', 'vendor/**', @@ -154,6 +155,7 @@ function isTranslationSourceExcluded(file: string): boolean { || segment.startsWith('.doc-typecheck-') || segment.startsWith('.node-next-types-')) || file.startsWith('apps/web/dist/') + || file.startsWith('apps/cli/docs/') || file.startsWith('python/sdk-runtime/src/deepseek_harness_runtime/runtime/') }