@deepseek-ai/dsh-plugin-manager 0.2.2-alpha.2 → 0.2.2-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.i18n.yaml CHANGED
@@ -15,8 +15,8 @@
15
15
  en: 87679c51aa3693f5
16
16
  zh: 11684a48a5806afb
17
17
  /deepseek-ai-dsh-plugin-manager/use-this-package:
18
- en: 4bda68030a6999e0
19
- zh: 5ae0b9825341c05e
18
+ en: ae0905aa47cc971d
19
+ zh: b22fc6e831fac136
20
20
  /deepseek-ai-dsh-plugin-manager/use-this-package/version-compatibility-and-exemptions:
21
21
  en: 483285658e267dd5
22
22
  zh: 846bec2daac59a96
package/README.md CHANGED
@@ -28,9 +28,9 @@ Manage the current profile's plugins without editing configuration by hand. Enab
28
28
  <a id="use-this-package"></a>
29
29
  ## Use this package
30
30
 
31
- Base-backed profiles provide the manager. In Web, the sidebar's **Plugins** page ([ui-plugin-manager](../../client/ui-plugin-manager/README.md)) manages the profile's bundles and their uniquely addressable rows; the Settings Plugin list stays read-only. Agent-preset rows remain read-only. The `plugin_manager` tool exposes the same operations and is enabled in the Standard and Creator presets. Other presets keep it disabled by default. Every tool action requires `danger-full-access` or approval for that call. Under lower sandbox modes, `ask` requests approval; `never`, rejection, cancellation, or an unavailable approval channel prevents execution. An approval leaves the session permission mode unchanged. Profile changes persist across sessions, and installed Host code executes in-process outside the workspace sandbox. Dependency build-script approval remains separate.
31
+ Base-backed profiles provide the manager. In Web, the sidebar's **Plugins** page ([ui-plugin-manager](../../client/ui-plugin-manager/README.md)) manages the profile's bundles and their uniquely addressable rows; the Settings Plugin list stays read-only. Agent-preset rows remain read-only. The `plugin_manager` tool exposes the same operations and is enabled in the Standard and Creator presets. Other Web presets keep it disabled by default. The full SDK profile enables it at profile scope in native/PTC mode; without HMR, saved changes return `restart-required` with `no-hmr` and apply after the runtime restarts. Every tool action requires `danger-full-access` or approval for that call. Under lower sandbox modes, `ask` requests approval; `never`, rejection, cancellation, or an unavailable approval channel prevents execution. An approval leaves the session permission mode unchanged. Profile changes persist across sessions, and installed Host code executes in-process outside the workspace sandbox. Dependency build-script approval remains separate.
32
32
 
33
- For a deployment without agent presets, enable the tool in the profile patch. Preset-backed sessions use their preset’s `tool-plugin-manager` entry.
33
+ For a deployment without agent presets other than the full SDK profile, enable the tool in the profile patch. Package installation/removal requires pnpm on `PATH` or an explicit `pnpmCommand`; a launcher-provided package manager takes precedence. Preset-backed sessions use their preset’s `tool-plugin-manager` entry.
34
34
 
35
35
  ```yaml
36
36
  - id: tool-plugin-manager
@@ -57,7 +57,7 @@ Official on-demand installs call the same `installBundle` operation as other bun
57
57
 
58
58
  `updateBundle(name, version, options)` replaces an updatable bundle with an exact newer version; an older version is refused. The target is first viewed over the same plan as `listVersions`, and a version that is missing, declares no bundle, or whose `engines.dsh` or DSH peers reject the running DSH stops the update at `step: 'check'` with the profile unchanged. With HMR the update removes the installed version, so its plugins stop, then installs `name@version` with `saveExact` and the current selection from the registry that answered. When that installation fails, is cancelled, or installs but cannot start, the target is removed if it stayed and the removed version is installed again from the registry it was installed from in this process, else over the configured plan as its removal asks, and reported as `restore`; a reinstallation that also fails leaves the package uninstalled. A removal or installation that rejects, for example on a lock timeout, is reported as that step's failure. Without HMR the target is installed over the running version and the result reports `restart-required`. `plugin-manager/update-state` announces `checking`, `removing`, `installing`, and `restoring` under the caller's `requestId`; the target's installation streams its logs and accepts `cancelInstall` under the same id, while the reinstallation carries none, so a cancellation cannot stop it.
59
59
 
60
- `installBundle` checks GitHub repositories with `git ls-remote` before starting pnpm, using the profile directory and the installer's Git and proxy configuration. `githubConnectionTimeoutMs` defaults to 5000 ms and limits only this check, not package download or builds. The check disables credential helpers and prompts; only network failures and timeouts stop installation, reporting `failedAt: 'spec-host'` with the existing failure kind and diagnostic log. Authentication, repository lookup and other failures are left to pnpm, including its HTTPS-to-SSH fallback. Cancellation and manager disposal stop the check and its descendants. Registry packages, paths, tarballs and other Git hosts skip this check. A reachable repository can still fail during download or bundle validation.
60
+ `installBundle` checks GitHub repositories with `git ls-remote` before starting pnpm, using the profile directory and the installer's Git and proxy configuration. `githubConnectionTimeoutMs` defaults to 5000 ms and limits only this check, not package download or builds. The check disables credential helpers and prompts; only network failures and timeouts stop installation, reporting `failedAt: 'spec-host'` with the existing failure kind and diagnostic log. A stopped installation streams that failure under its `requestId` as the installation's only `plugin-manager/install-log` run, named by the `git ls-remote` command line with any URL user information removed; a timed-out check reports no exit code. The answer's `packageResult` stays a plain result, without the command line. Authentication, repository lookup and other failures are left to pnpm, including its HTTPS-to-SSH fallback. Cancellation and manager disposal stop the check and its descendants. Registry packages, paths, tarballs and other Git hosts skip this check. A reachable repository can still fail during download or bundle validation.
61
61
 
62
62
  An HTTP(S) Git URL on a host for which pnpm has no HTTPS-to-SSH fallback, that is, any host `hosted-git-info` does not know, such as a self-hosted GitLab, is probed with `git ls-remote` before pnpm starts. The probe uses the installer's Git configuration and credential helpers with Git's terminal and askpass prompts disabled; on POSIX it also has no controlling terminal, so SSH cannot prompt. When HTTP(S) cannot read the repository and `ssh://git@<host>/<path>` can, pnpm installs that SSH URL with the original fragment, and the profile records it. Otherwise the spec is installed unchanged. Each probe is bounded by `gitTransportTimeoutMs`, 5000 ms by default; cancellation and manager disposal stop it. URLs with credentials or a query skip the probe.
63
63
 
@@ -65,7 +65,7 @@ Registries are asked in turn. The plan starts at `options.registry`, else the co
65
65
 
66
66
  The browser-safe `@deepseek-ai/dsh-plugin-manager/registry` entry exports `OFFICIAL_NPM_REGISTRY` and `NPMMIRROR_REGISTRY` for consumers that identify those public registries.
67
67
 
68
- `installBundle` accepts a caller-generated `requestId`, under which `plugin-manager/install-log` streams each pnpm run's output and `plugin-manager/install-state` announces `installing`, `cancelling`, and `applying`; `installing` is announced once per registry asked, with the `attempt`'s registry, position, and the plan's length. The install asks the same plan as the lookup, from `options.registry`, running `pnpm add` with `--registry` and restoring the profile files between attempts; it moves on for the failures another registry can change and stops at any other, and at a failure whose error line names the host a git or tarball spec is fetched from, which no registry stands in for; `failedAt` says which of the two the last failed run could not reach. `cancelInstall(requestId)` stops the run and answers `cancelled` only after the Git check or pnpm exited and the files are back, `too-late` once the bundle is being applied, and `not-running` for any other id; the install call then reports `application: 'cancelled'`. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; `packageResult.kind` classifies the last run from its exit and output, `registries` names every registry asked, `bundle` names the package a finished run added, and `version` its manifest version, which can differ from the version `inspect` read, for example when pnpm's `minimumReleaseAge` holds back a recent release. `listBundles` carries each bundle's one-liner (the package `description`), the rows its patch declares with their live entries, and the built-in rows it overrides; it lists the profile's own bundles, the bundles the installation supplies, and a selected name without a bundle patch as a `not-bundle` problem, while an unselected plain dependency is left out. A bundle the launcher's `OPTIONAL_BUNDLES` names is `optional`: shipped switched off for the person to turn on, never removable, and selected by no shipped template ([rationale](../../../.agents/notes/implemented/process/2026-09-15-shipped-optional-bundles.md)). Every completed operation emits `plugin-manager/changed`; a patch generation applied outside the manager, by HMR's watcher after a CLI or hand edit, announces nothing, so the page learns of it on its next read.
68
+ `installBundle` accepts a caller-generated `requestId`, under which `plugin-manager/install-log` streams each pnpm run's output and `plugin-manager/install-state` announces `installing`, `cancelling`, and `applying`; a pnpm run that fails without printing streams the diagnostic its log carries, so the details panel is not left empty. `installing` is announced once per registry asked, with the `attempt`'s registry, position, and the plan's length. The install asks the same plan as the lookup, from `options.registry`, running `pnpm add` with `--registry` and restoring the profile files between attempts; it moves on for the failures another registry can change and stops at any other, and at a failure whose error line names the host a git or tarball spec is fetched from, which no registry stands in for; `failedAt` says which of the two the last failed run could not reach. `cancelInstall(requestId)` stops the run and answers `cancelled` only after the Git check or pnpm exited and the files are back, `too-late` once the bundle is being applied, and `not-running` for any other id; the install call then reports `application: 'cancelled'`. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; `packageResult.kind` classifies the last run from its exit and output, `registries` names every registry asked, `bundle` names the package a finished run added, and `version` its manifest version, which can differ from the version `inspect` read, for example when pnpm's `minimumReleaseAge` holds back a recent release. `listBundles` carries each bundle's one-liner (the package `description`), the rows its patch declares with their live entries, and the built-in rows it overrides; it lists the profile's own bundles, the bundles the installation supplies, and a selected name without a bundle patch as a `not-bundle` problem, while an unselected plain dependency is left out. A bundle the launcher's `OPTIONAL_BUNDLES` names is `optional`: shipped switched off for the person to turn on, never removable, and selected by no shipped template ([rationale](../../../.agents/notes/implemented/process/2026-09-15-shipped-optional-bundles.md)). Every completed operation emits `plugin-manager/changed`; a patch generation applied outside the manager, by HMR's watcher after a CLI or hand edit, announces nothing, so the page learns of it on its next read.
69
69
 
70
70
  `waitForInstall(requestId)` lets a client recover a lost response by waiting for the active installation, including its non-cancellable application phase. It returns the same outcome as the original call, or `null` if the request is not active. Completed results are not retained; `null` establishes neither success nor cancellation.
71
71
 
package/README.zh.md CHANGED
@@ -28,9 +28,9 @@ kind: "package-reference"
28
28
  <a id="use-this-package"></a>
29
29
  ## 使用本包
30
30
 
31
- 基于 base 的 profile 提供管理服务。在 Web 中,侧边栏的**插件**页([ui-plugin-manager](../../client/ui-plugin-manager/README.zh.md))管理 profile 的组合包及其能唯一定位的行;设置页的插件列表保持只读。Agent 预设条目保持只读。`plugin_manager` 工具提供相同操作,在标准和 Creator 预设中启用。其他预设仍默认禁用。每个工具操作都要求 `danger-full-access` 或本次调用的批准。在较低沙箱模式下,`ask` 会请求审批;`never`、拒绝、取消或审批渠道不可用时均不执行。批准不改变会话的权限模式。profile 变更跨会话持久化,已安装的 Host 代码在宿主进程内运行,不受工作区沙箱限制。依赖构建脚本仍需单独批准。
31
+ 基于 base 的 profile 提供管理服务。在 Web 中,侧边栏的**插件**页([ui-plugin-manager](../../client/ui-plugin-manager/README.zh.md))管理 profile 的组合包及其能唯一定位的行;设置页的插件列表保持只读。Agent 预设条目保持只读。`plugin_manager` 工具提供相同操作,在标准和 Creator 预设中启用。其他 Web 预设仍默认禁用。完整 SDK profile 在 profile 作用域为 native/PTC 模式启用此工具;没有 HMR 时,保存的变更返回 `restart-required` 和 `no-hmr`,在运行时重启后应用。每个工具操作都要求 `danger-full-access` 或本次调用的批准。在较低沙箱模式下,`ask` 会请求审批;`never`、拒绝、取消或审批渠道不可用时均不执行。批准不改变会话的权限模式。profile 变更跨会话持久化,已安装的 Host 代码在宿主进程内运行,不受工作区沙箱限制。依赖构建脚本仍需单独批准。
32
32
 
33
- 未使用 Agent 预设的部署在 profile patch 中启用工具;使用预设的会话由其预设中的 `tool-plugin-manager` 条目控制。
33
+ 除完整 SDK profile 外,未使用 Agent 预设的部署在 profile patch 中启用工具;安装/移除包要求 PATH 中有 pnpm,或显式配置 `pnpmCommand`,启动器提供的包管理器优先;使用预设的会话由其预设中的 `tool-plugin-manager` 条目控制。
34
34
 
35
35
  ```yaml
36
36
  - id: tool-plugin-manager
@@ -57,7 +57,7 @@ kind: "package-reference"
57
57
 
58
58
  `updateBundle(name, version, options)` 把可更新的组合包替换为一个更新的确切版本;更旧的版本会被拒绝。目标版本先按与 `listVersions` 相同的计划查询,版本不存在、未声明组合包,或其 `engines.dsh` 或 DSH peer 拒绝当前 DSH 时,更新停在 `step: 'check'`,profile 保持不变。有 HMR 时,更新先移除已安装版本,使其插件停止,再以 `saveExact` 和当前的选中状态从作答的注册表安装 `name@version`。该安装失败、被取消,或已安装但无法启动时,先移除仍留下的目标版本,再从本进程安装被移除版本所用的注册表重新安装它,没有记录时按配置的计划安装,与移除的做法一致,结果以 `restore` 报告;重新安装也失败时,包处于未安装状态。移除或安装被拒绝(例如锁等待超时)时,报告为该步骤失败。没有 HMR 时,目标版本直接安装在运行中的版本之上,结果报告 `restart-required`。`plugin-manager/update-state` 以调用方的 `requestId` 通告 `checking`、`removing`、`installing` 与 `restoring`;目标版本的安装以同一 id 流式输出日志并接受 `cancelInstall`,重新安装不带 id,因此取消无法中止它。
59
59
 
60
- `installBundle` 在启动 pnpm 前通过 `git ls-remote` 检查 GitHub 仓库,使用 profile 目录及安装器的 Git 与代理配置。`githubConnectionTimeoutMs` 默认为 5000 毫秒,只限制这次检查,不限制包下载或构建。检查禁用凭据助手和认证提示;只有网络失败与超时会停止安装,通过现有失败类型与诊断日志返回,并标记 `failedAt: 'spec-host'`。认证、仓库查找及其他失败继续交给 pnpm,包括其 HTTPS 到 SSH 的回退。取消安装或销毁管理器会停止检查及其子进程。注册表包、本地路径、压缩包和其他 Git 主机跳过此检查。仓库可达后,下载或组合包验证仍可能失败。
60
+ `installBundle` 在启动 pnpm 前通过 `git ls-remote` 检查 GitHub 仓库,使用 profile 目录及安装器的 Git 与代理配置。`githubConnectionTimeoutMs` 默认为 5000 毫秒,只限制这次检查,不限制包下载或构建。检查禁用凭据助手和认证提示;只有网络失败与超时会停止安装,通过现有失败类型与诊断日志返回,并标记 `failedAt: 'spec-host'`。被停止的安装会以调用方的 `requestId` 把该失败转发为这次安装唯一的 `plugin-manager/install-log` 运行,其命令行是去掉 URL 用户信息的 `git ls-remote`;因超时结束的检查不报告退出码。应答中的 `packageResult` 仍是普通结果,不含该命令行。认证、仓库查找及其他失败继续交给 pnpm,包括其 HTTPS 到 SSH 的回退。取消安装或销毁管理器会停止检查及其子进程。注册表包、本地路径、压缩包和其他 Git 主机跳过此检查。仓库可达后,下载或组合包验证仍可能失败。
61
61
 
62
62
  HTTP(S) Git URL 指向 pnpm 没有 HTTPS 到 SSH 回退的主机(即 `hosted-git-info` 不认识的任何主机,例如自托管 GitLab)时,在启动 pnpm 前通过 `git ls-remote` 探测。探测使用安装器的 Git 配置与凭据助手,并禁用 Git 的终端与 askpass 提示;在 POSIX 上探测也没有控制终端,因此 SSH 无法提示。HTTP(S) 无法读取仓库而 `ssh://git@<host>/<path>` 可以读取时,pnpm 以该 SSH URL 加上原片段安装,profile 也记录该 URL。否则按原 spec 安装。每次探测受 `gitTransportTimeoutMs` 限制,默认为 5000 毫秒;取消安装或销毁管理器会停止探测。带凭据或查询串的 URL 跳过探测。
63
63
 
@@ -65,7 +65,7 @@ HTTP(S) Git URL 指向 pnpm 没有 HTTPS 到 SSH 回退的主机(即 `hosted-g
65
65
 
66
66
  可在浏览器使用的 `@deepseek-ai/dsh-plugin-manager/registry` 入口导出 `OFFICIAL_NPM_REGISTRY` 和 `NPMMIRROR_REGISTRY`,供消费方识别这两个公共注册表。
67
67
 
68
- `installBundle` 接受调用方生成的 `requestId`,`plugin-manager/install-log` 在其下流式转发每次 pnpm 运行的输出,`plugin-manager/install-state` 通告 `installing`、`cancelling` 与 `applying`;每问一个注册表通告一次 `installing`,`attempt` 带上这次的注册表、序号和计划长度。安装沿用查询的计划,从 `options.registry` 开始,以 `--registry` 运行 `pnpm add`,两次尝试之间恢复 profile 文件;换一个注册表能改变的失败才转问下一个,其他失败即停,错误行点名 git 或 tarball spec 自身拉取主机的失败也停,因为没有注册表能替代那台主机;`failedAt` 说明最后一次失败的运行连不上的是二者中的哪一个。`cancelInstall(requestId)` 停止运行,只在 Git 检查或 pnpm 退出且文件恢复后答复 `cancelled`,组合包已在应用时答复 `too-late`,其他 id 答复 `not-running`;安装调用随后报告 `application: 'cancelled'`。失败、被取消或装入了没有组合包 patch 的包的运行,会把 `package.json` 与 `pnpm-lock.yaml` 恢复原样;`packageResult.kind` 按退出方式与输出对最后一次运行分类,`registries` 列出问过的每个注册表,`bundle` 给出完成的运行新增的包,`version` 给出它的清单版本,它可能与 `inspect` 读到的版本不同,例如 pnpm 的 `minimumReleaseAge` 暂缓了最近的发布。`listBundles` 携带每个组合包的一句话简介(包的 `description`)、其 patch 声明的行及其存活条目,以及它覆盖的内置行;它列出 profile 自己的组合包、安装提供的组合包,以及被选中却没有组合包 patch 的名字(作为 `not-bundle` 问题),未选中的普通依赖不列出。启动器的 `OPTIONAL_BUNDLES` 点名的组合包是 `optional`:随安装提供、默认关闭、由用户开启,永不可卸载,也不被任何随附模板选中([理由](../../../.agents/notes/implemented/process/2026-09-15-shipped-optional-bundles.zh.md))。每个完成的操作都会发出 `plugin-manager/changed`;在管理器之外应用的一代 patch(HMR 监视到 CLI 或手工编辑后)不发通知,页面要到下一次读取才知道。
68
+ `installBundle` 接受调用方生成的 `requestId`,`plugin-manager/install-log` 在其下流式转发每次 pnpm 运行的输出,`plugin-manager/install-state` 通告 `installing`、`cancelling` 与 `applying`;未打印任何输出就失败的 pnpm 运行转发其日志中的诊断,详情面板因而不会为空。每问一个注册表通告一次 `installing`,`attempt` 带上这次的注册表、序号和计划长度。安装沿用查询的计划,从 `options.registry` 开始,以 `--registry` 运行 `pnpm add`,两次尝试之间恢复 profile 文件;换一个注册表能改变的失败才转问下一个,其他失败即停,错误行点名 git 或 tarball spec 自身拉取主机的失败也停,因为没有注册表能替代那台主机;`failedAt` 说明最后一次失败的运行连不上的是二者中的哪一个。`cancelInstall(requestId)` 停止运行,只在 Git 检查或 pnpm 退出且文件恢复后答复 `cancelled`,组合包已在应用时答复 `too-late`,其他 id 答复 `not-running`;安装调用随后报告 `application: 'cancelled'`。失败、被取消或装入了没有组合包 patch 的包的运行,会把 `package.json` 与 `pnpm-lock.yaml` 恢复原样;`packageResult.kind` 按退出方式与输出对最后一次运行分类,`registries` 列出问过的每个注册表,`bundle` 给出完成的运行新增的包,`version` 给出它的清单版本,它可能与 `inspect` 读到的版本不同,例如 pnpm 的 `minimumReleaseAge` 暂缓了最近的发布。`listBundles` 携带每个组合包的一句话简介(包的 `description`)、其 patch 声明的行及其存活条目,以及它覆盖的内置行;它列出 profile 自己的组合包、安装提供的组合包,以及被选中却没有组合包 patch 的名字(作为 `not-bundle` 问题),未选中的普通依赖不列出。启动器的 `OPTIONAL_BUNDLES` 点名的组合包是 `optional`:随安装提供、默认关闭、由用户开启,永不可卸载,也不被任何随附模板选中([理由](../../../.agents/notes/implemented/process/2026-09-15-shipped-optional-bundles.zh.md))。每个完成的操作都会发出 `plugin-manager/changed`;在管理器之外应用的一代 patch(HMR 监视到 CLI 或手工编辑后)不发通知,页面要到下一次读取才知道。
69
69
 
70
70
  `waitForInstall(requestId)` 让客户端在响应丢失后等待活动安装的结果,包括不可取消的应用阶段。它返回与原调用相同的结果,请求不在活动中时返回 `null`。已完成的结果不保留;`null` 不表示成功或已取消。
71
71
 
package/lib/index.js CHANGED
@@ -802,6 +802,7 @@ async function runProfilePnpm(context, args, options) {
802
802
  if (result.failed && output.length === 0) {
803
803
  const diagnostic = result.shortMessage ?? "pnpm failed";
804
804
  await log.write(diagnostic);
805
+ options.onOutput?.(diagnostic, "stderr");
805
806
  truncated = Buffer.byteLength(diagnostic) > options.outputBytes;
806
807
  output = Buffer.from(diagnostic).subarray(0, options.outputBytes);
807
808
  }
@@ -1277,7 +1278,8 @@ async function approveBuilds(dir, names) {
1277
1278
  * @param spec The parsed installation address; npm packages, local paths and other hosts are not checked.
1278
1279
  * @param dir The profile directory where installation runs.
1279
1280
  * @param options The connection deadline, output bound and operation cancellation.
1280
- * @returns A failed check with bounded output and a complete log at logPath, or undefined for a reachable repository or an unhandled spec.
1281
+ * @returns A failed check carrying the command line it ran (without URL user information) and its bounded output, with a
1282
+ * complete log at logPath, or undefined for a reachable repository or an unhandled spec.
1281
1283
  */
1282
1284
  async function checkGithubConnection(spec, dir, options) {
1283
1285
  if (spec.kind !== "git") return void 0;
@@ -1291,15 +1293,19 @@ async function checkGithubConnection(spec, dir, options) {
1291
1293
  });
1292
1294
  const logPath = join(await mkdtemp(join(logRoot, "github-connection-")), "git.log");
1293
1295
  const log = await open(logPath, "ax+", 384);
1296
+ const argv = [
1297
+ "git",
1298
+ "-c",
1299
+ "credential.helper=",
1300
+ "ls-remote",
1301
+ "--",
1302
+ repository,
1303
+ "HEAD"
1304
+ ];
1305
+ const recordedArgv = argv.map((argument) => argument.replace(HTTP_USER_INFO, "$1"));
1306
+ const [command, ...args] = argv;
1294
1307
  try {
1295
- const result = await execa("git", [
1296
- "-c",
1297
- "credential.helper=",
1298
- "ls-remote",
1299
- "--",
1300
- repository,
1301
- "HEAD"
1302
- ], {
1308
+ const result = await execa(command, args, {
1303
1309
  cwd: dir,
1304
1310
  env: {
1305
1311
  ...scrubbedParentEnv(),
@@ -1332,6 +1338,7 @@ async function checkGithubConnection(spec, dir, options) {
1332
1338
  await log.read(bytes, 0, bytes.length, size - bytes.length);
1333
1339
  const output = bytes.toString("utf8");
1334
1340
  return {
1341
+ argv: recordedArgv,
1335
1342
  exitCode: result.exitCode ?? (result.code === "ENOENT" ? 127 : 1),
1336
1343
  output,
1337
1344
  truncated: size > options.outputBytes,
@@ -1339,7 +1346,8 @@ async function checkGithubConnection(spec, dir, options) {
1339
1346
  kind: classifyInstallFailure({
1340
1347
  log: output,
1341
1348
  timedOut: result.timedOut
1342
- })
1349
+ }),
1350
+ ...result.timedOut ? { timedOut: true } : {}
1343
1351
  };
1344
1352
  } finally {
1345
1353
  await log.close();
@@ -2167,6 +2175,7 @@ let PluginManager = (() => {
2167
2175
  enabled,
2168
2176
  installed,
2169
2177
  optional,
2178
+ ...offered.listedByDefault === void 0 ? {} : { listedByDefault: offered.listedByDefault },
2170
2179
  ...platformError?.code === "unsupported-platform" ? { listedByDefault: false } : {},
2171
2180
  removable: enabled,
2172
2181
  rows: [],
@@ -2689,7 +2698,8 @@ let PluginManager = (() => {
2689
2698
  /**
2690
2699
  * Install a package using the same pnpm implementation as dsh plugin. GitHub
2691
2700
  * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;
2692
- * only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. An
2701
+ * only network failures or timeouts stop installation, and a stop streams the check's diagnostic
2702
+ * as the installation's install-log run under its request id, while pnpm owns authentication and transport fallback. An
2693
2703
  * HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs
2694
2704
  * find that only SSH can read it. A run
2695
2705
  * that fails, is cancelled, or adds a package without a bundle patch restores
@@ -2748,8 +2758,18 @@ let PluginManager = (() => {
2748
2758
  }
2749
2759
  if (stopped()) throw new InstallCancelledError();
2750
2760
  if (connectionFailure?.kind === "network" || connectionFailure?.kind === "timeout") {
2751
- result.packageResult = connectionFailure;
2761
+ const { argv, ...packageResult } = connectionFailure;
2762
+ result.packageResult = packageResult;
2752
2763
  result.failedAt = "spec-host";
2764
+ if (requestId !== void 0) this.ownerContext.emit("plugin-manager/install-log", {
2765
+ requestId,
2766
+ jobId: randomUUID(),
2767
+ argv,
2768
+ cwd: this.profile.dir,
2769
+ stream: "stderr",
2770
+ text: connectionFailure.output,
2771
+ exitCode: connectionFailure.timedOut === true ? null : connectionFailure.exitCode
2772
+ });
2753
2773
  throw new Error(connectionFailure.output);
2754
2774
  }
2755
2775
  const transport = chooseGitTransport(parsed, this.profile.dir, {
@@ -61,12 +61,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
61
61
  }).optional(),
62
62
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
63
63
  'packageResult': z.object({
64
- 'exitCode': z.number(),
64
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
65
65
  'output': z.string(),
66
66
  'truncated': z.boolean(),
67
67
  'logPath': z.string(),
68
68
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
69
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
69
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
70
70
  'incompatible': z.array(z.object({
71
71
  'name': z.string(),
72
72
  'version': z.string(),
@@ -266,12 +266,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
266
266
  }).optional(),
267
267
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
268
268
  'packageResult': z.object({
269
- 'exitCode': z.number(),
269
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
270
270
  'output': z.string(),
271
271
  'truncated': z.boolean(),
272
272
  'logPath': z.string(),
273
273
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
274
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
274
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
275
275
  'incompatible': z.array(z.object({
276
276
  'name': z.string(),
277
277
  'version': z.string(),
@@ -310,12 +310,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
310
310
  }).optional(),
311
311
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
312
312
  'packageResult': z.object({
313
- 'exitCode': z.number(),
313
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
314
314
  'output': z.string(),
315
315
  'truncated': z.boolean(),
316
316
  'logPath': z.string(),
317
317
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
318
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
318
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
319
319
  'incompatible': z.array(z.object({
320
320
  'name': z.string(),
321
321
  'version': z.string(),
@@ -354,12 +354,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
354
354
  }).optional(),
355
355
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
356
356
  'packageResult': z.object({
357
- 'exitCode': z.number(),
357
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
358
358
  'output': z.string(),
359
359
  'truncated': z.boolean(),
360
360
  'logPath': z.string(),
361
361
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
362
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
362
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
363
363
  'incompatible': z.array(z.object({
364
364
  'name': z.string(),
365
365
  'version': z.string(),
@@ -402,12 +402,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
402
402
  }).optional(),
403
403
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
404
404
  'packageResult': z.object({
405
- 'exitCode': z.number(),
405
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
406
406
  'output': z.string(),
407
407
  'truncated': z.boolean(),
408
408
  'logPath': z.string(),
409
409
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
410
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
410
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
411
411
  'incompatible': z.array(z.object({
412
412
  'name': z.string(),
413
413
  'version': z.string(),
@@ -455,12 +455,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_updateBundle_result$schema =
455
455
  }).optional(),
456
456
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
457
457
  'packageResult': z.object({
458
- 'exitCode': z.number(),
458
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
459
459
  'output': z.string(),
460
460
  'truncated': z.boolean(),
461
461
  'logPath': z.string(),
462
462
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
463
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
463
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
464
464
  'incompatible': z.array(z.object({
465
465
  'name': z.string(),
466
466
  'version': z.string(),
@@ -494,12 +494,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_updateBundle_result$schema =
494
494
  }).optional(),
495
495
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
496
496
  'packageResult': z.object({
497
- 'exitCode': z.number(),
497
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
498
498
  'output': z.string(),
499
499
  'truncated': z.boolean(),
500
500
  'logPath': z.string(),
501
501
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
502
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
502
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
503
503
  'incompatible': z.array(z.object({
504
504
  'name': z.string(),
505
505
  'version': z.string(),
@@ -537,12 +537,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
537
537
  }).optional(),
538
538
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
539
539
  'packageResult': z.object({
540
- 'exitCode': z.number(),
540
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
541
541
  'output': z.string(),
542
542
  'truncated': z.boolean(),
543
543
  'logPath': z.string(),
544
544
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
545
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
545
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
546
546
  'incompatible': z.array(z.object({
547
547
  'name': z.string(),
548
548
  'version': z.string(),
@@ -652,7 +652,7 @@ const $remote = createTypertRemoteInfo({
652
652
  description: '`cancelled` once the Git check or pnpm exited and the files are restored, `too-late` once the bundle is being applied, `not-running` for any other id.',
653
653
  jsonSchema: {"type":"object","properties":{"status":{"type":"string","enum":["cancelled","not-running","too-late"]}},"required":["status"],"additionalProperties":true},
654
654
  },
655
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1018,"column":9},
655
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1030,"column":9},
656
656
  },
657
657
  'pluginManager/inspect': {
658
658
  service: 'pluginManager',
@@ -703,11 +703,11 @@ const $remote = createTypertRemoteInfo({
703
703
  description: 'The package the spec names, or why it is refused.',
704
704
  jsonSchema: {"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"accepted"},"kind":{"type":"string","enum":["registry","path","git","tarball"]},"name":{"type":"string"},"version":{"type":"string"},"description":{"type":"string","description":"`description` of the package manifest."},"bundle":{"oneOf":[{"type":"null","const":null},{"type":"boolean","enum":[false,true]}],"description":"Whether the package declares a bundle patch; null when the spec's form does not say."},"registry":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The registry that answered for a name, and for the other forms the one an install of the spec asks first."},"host":{"type":"string","description":"The host a git spec or a tarball URL is fetched from, which no registry stands in for."}},"required":["status","kind","bundle","registry"],"additionalProperties":true},{"type":"object","properties":{"status":{"type":"string","const":"refused"},"problem":{"type":"string","enum":["network","unknown","not-found","invalid-spec","already-installed","not-a-package","not-a-bundle"]},"reason":{"type":"string","description":"What pnpm, the registry, or the file system said."},"registries":{"type":"array","items":{"oneOf":[{"type":"null","const":null},{"type":"string"}]},"description":"The registries asked, in order, when the refusal came from asking them; `reason` is the last one's."}},"required":["status","problem","reason"],"additionalProperties":true}]},
705
705
  },
706
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":602,"column":9},
706
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":603,"column":9},
707
707
  },
708
708
  'pluginManager/installBundle': {
709
709
  service: 'pluginManager',
710
- description: 'Install a package using the same pnpm implementation as dsh plugin. GitHub repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts; only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. An HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs find that only SSH can read it. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.',
710
+ description: 'Install a package using the same pnpm implementation as dsh plugin. GitHub repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts; only network failures or timeouts stop installation, and a stop streams the check\'s diagnostic as the installation\'s install-log run under its request id, while pnpm owns authentication and transport fallback. An HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs find that only SSH can read it. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.',
711
711
  invocation: { kind: 'direct' },
712
712
  parameters: [
713
713
  {
@@ -753,7 +753,7 @@ const $remote = createTypertRemoteInfo({
753
753
  description: 'Package-manager diagnostics, the registries asked, and the observed activation outcome.',
754
754
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
755
755
  },
756
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":871,"column":3},
756
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":873,"column":3},
757
757
  },
758
758
  'pluginManager/listBundles': {
759
759
  service: 'pluginManager',
@@ -849,7 +849,7 @@ const $remote = createTypertRemoteInfo({
849
849
  description: 'At most `versionListLimit` newer versions, newest first, with their tags, deprecation, bundle declaration, and DSH compatibility, and the registry that answered; or why no list could be read, with every registry asked.',
850
850
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
851
851
  },
852
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":662,"column":9},
852
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":663,"column":9},
853
853
  },
854
854
  'pluginManager/readBundleDetail': {
855
855
  service: 'pluginManager',
@@ -931,7 +931,7 @@ const $remote = createTypertRemoteInfo({
931
931
  description: 'The registries in pnpm\'s comparison form; null is the one pnpm\'s own configuration names, `resolved` as pnpm reads it now.',
932
932
  jsonSchema: {"type":"object","properties":{"registry":{"oneOf":[{"type":"null","const":null},{"type":"string"}]},"fallbackRegistries":{"type":"array","items":{"type":"string"}},"resolved":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The URL pnpm's own configuration names in the profile, read from pnpm; null when it could not be read."}},"required":["registry","fallbackRegistries","resolved"],"additionalProperties":true},
933
933
  },
934
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":586,"column":9},
934
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":587,"column":9},
935
935
  },
936
936
  'pluginManager/removeBundle': {
937
937
  service: 'pluginManager',
@@ -963,7 +963,7 @@ const $remote = createTypertRemoteInfo({
963
963
  description: 'Removal diagnostics and the remaining profile state.',
964
964
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
965
965
  },
966
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1035,"column":3},
966
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1047,"column":3},
967
967
  },
968
968
  'pluginManager/setBundleEnabled': {
969
969
  service: 'pluginManager',
@@ -1012,7 +1012,7 @@ const $remote = createTypertRemoteInfo({
1012
1012
  description: 'Persisted and runtime outcomes.',
1013
1013
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1014
1014
  },
1015
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":850,"column":3},
1015
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":851,"column":3},
1016
1016
  },
1017
1017
  'pluginManager/setPluginEnabled': {
1018
1018
  service: 'pluginManager',
@@ -1061,7 +1061,7 @@ const $remote = createTypertRemoteInfo({
1061
1061
  description: 'Saved and runtime outcomes, including higher-priority overrides.',
1062
1062
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1063
1063
  },
1064
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":832,"column":3},
1064
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":833,"column":3},
1065
1065
  },
1066
1066
  'pluginManager/setVersionExemption': {
1067
1067
  service: 'pluginManager',
@@ -1212,7 +1212,7 @@ const $remote = createTypertRemoteInfo({
1212
1212
  description: 'The versions, the last step that ran with its result, and the reinstallation when one ran.',
1213
1213
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1214
1214
  },
1215
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":713,"column":9},
1215
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":714,"column":9},
1216
1216
  },
1217
1217
  'pluginManager/waitForInstall': {
1218
1218
  service: 'pluginManager',
@@ -1244,7 +1244,7 @@ const $remote = createTypertRemoteInfo({
1244
1244
  description: 'The installation\'s outcome after it settles, or null if no active request has that id. Completed results are not retained; null establishes neither success nor cancellation.',
1245
1245
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1246
1246
  },
1247
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1008,"column":9},
1247
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1020,"column":9},
1248
1248
  },
1249
1249
  },
1250
1250
  }, z)
@@ -1347,7 +1347,7 @@ export const TYPERT = {
1347
1347
  "name": "installBundle",
1348
1348
  "signature": "@Remote installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>",
1349
1349
  "summary": "Install a package using the same pnpm implementation as dsh plugin.",
1350
- "jsDoc": "/**\n * Install a package using the same pnpm implementation as dsh plugin. GitHub\n * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;\n * only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. An\n * HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs\n * find that only SSH can read it. A run\n * that fails, is cancelled, or adds a package without a bundle patch restores\n * `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.\n * @param spec One package spec, including local paths relative to the invocation directory.\n * @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,\n * the pending build scripts to allow, whether to save an exact dependency, and the registry asked first.\n * @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.\n */"
1350
+ "jsDoc": "/**\n * Install a package using the same pnpm implementation as dsh plugin. GitHub\n * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;\n * only network failures or timeouts stop installation, and a stop streams the check's diagnostic\n * as the installation's install-log run under its request id, while pnpm owns authentication and transport fallback. An\n * HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs\n * find that only SSH can read it. A run\n * that fails, is cancelled, or adds a package without a bundle patch restores\n * `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.\n * @param spec One package spec, including local paths relative to the invocation directory.\n * @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,\n * the pending build scripts to allow, whether to save an exact dependency, and the registry asked first.\n * @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.\n */"
1351
1351
  },
1352
1352
  {
1353
1353
  "kind": "method",
@@ -1530,8 +1530,8 @@ export const TYPERT = {
1530
1530
  "signature": "'plugin-manager/changed'(change: PluginChange): void"
1531
1531
  },
1532
1532
  {
1533
- "description": "One chunk of a pnpm run's output, streamed as the run produces it.",
1534
- "summary": "One chunk of a pnpm run's output, streamed as the run produces it.",
1533
+ "description": "One chunk of an installation run's output, streamed as the run produces it.",
1534
+ "summary": "One chunk of an installation run's output, streamed as the run produces it.",
1535
1535
  "tags": [
1536
1536
  {
1537
1537
  "name": "mode",
@@ -1545,7 +1545,7 @@ export const TYPERT = {
1545
1545
  "text": "@param chunk - the chunk and the run it belongs to."
1546
1546
  }
1547
1547
  ],
1548
- "jsDoc": "/**\n * One chunk of a pnpm run's output, streamed as the run produces it.\n * @mode emit\n * @param chunk - the chunk and the run it belongs to.\n */",
1548
+ "jsDoc": "/**\n * One chunk of an installation run's output, streamed as the run produces it.\n * @mode emit\n * @param chunk - the chunk and the run it belongs to.\n */",
1549
1549
  "name": "plugin-manager/install-log",
1550
1550
  "mode": "emit",
1551
1551
  "signature": "'plugin-manager/install-log'(chunk: PluginInstallLogChunk): void"
@@ -61,12 +61,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
61
61
  }).optional(),
62
62
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
63
63
  'packageResult': z.object({
64
- 'exitCode': z.number(),
64
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
65
65
  'output': z.string(),
66
66
  'truncated': z.boolean(),
67
67
  'logPath': z.string(),
68
68
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
69
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
69
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
70
70
  'incompatible': z.array(z.object({
71
71
  'name': z.string(),
72
72
  'version': z.string(),
@@ -266,12 +266,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
266
266
  }).optional(),
267
267
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
268
268
  'packageResult': z.object({
269
- 'exitCode': z.number(),
269
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
270
270
  'output': z.string(),
271
271
  'truncated': z.boolean(),
272
272
  'logPath': z.string(),
273
273
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
274
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
274
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
275
275
  'incompatible': z.array(z.object({
276
276
  'name': z.string(),
277
277
  'version': z.string(),
@@ -310,12 +310,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
310
310
  }).optional(),
311
311
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
312
312
  'packageResult': z.object({
313
- 'exitCode': z.number(),
313
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
314
314
  'output': z.string(),
315
315
  'truncated': z.boolean(),
316
316
  'logPath': z.string(),
317
317
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
318
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
318
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
319
319
  'incompatible': z.array(z.object({
320
320
  'name': z.string(),
321
321
  'version': z.string(),
@@ -354,12 +354,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
354
354
  }).optional(),
355
355
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
356
356
  'packageResult': z.object({
357
- 'exitCode': z.number(),
357
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
358
358
  'output': z.string(),
359
359
  'truncated': z.boolean(),
360
360
  'logPath': z.string(),
361
361
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
362
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
362
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
363
363
  'incompatible': z.array(z.object({
364
364
  'name': z.string(),
365
365
  'version': z.string(),
@@ -402,12 +402,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
402
402
  }).optional(),
403
403
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
404
404
  'packageResult': z.object({
405
- 'exitCode': z.number(),
405
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
406
406
  'output': z.string(),
407
407
  'truncated': z.boolean(),
408
408
  'logPath': z.string(),
409
409
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
410
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
410
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
411
411
  'incompatible': z.array(z.object({
412
412
  'name': z.string(),
413
413
  'version': z.string(),
@@ -455,12 +455,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_updateBundle_result$schema =
455
455
  }).optional(),
456
456
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
457
457
  'packageResult': z.object({
458
- 'exitCode': z.number(),
458
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
459
459
  'output': z.string(),
460
460
  'truncated': z.boolean(),
461
461
  'logPath': z.string(),
462
462
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
463
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
463
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
464
464
  'incompatible': z.array(z.object({
465
465
  'name': z.string(),
466
466
  'version': z.string(),
@@ -494,12 +494,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_updateBundle_result$schema =
494
494
  }).optional(),
495
495
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
496
496
  'packageResult': z.object({
497
- 'exitCode': z.number(),
497
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
498
498
  'output': z.string(),
499
499
  'truncated': z.boolean(),
500
500
  'logPath': z.string(),
501
501
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
502
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
502
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
503
503
  'incompatible': z.array(z.object({
504
504
  'name': z.string(),
505
505
  'version': z.string(),
@@ -537,12 +537,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
537
537
  }).optional(),
538
538
  'warnings': z.array(z.string()).optional().describe('Pre-existing inactive entries the operation left as they were.'),
539
539
  'packageResult': z.object({
540
- 'exitCode': z.number(),
540
+ 'exitCode': z.number().describe('The status the run is read as having ended with; a run the manager terminated records the coerced status 1.'),
541
541
  'output': z.string(),
542
542
  'truncated': z.boolean(),
543
543
  'logPath': z.string(),
544
544
  'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional().describe('Present when the run failed: what kind of failure its exit and output describe.'),
545
- 'timedOut': z.boolean().optional().describe('The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended.'),
545
+ 'timedOut': z.boolean().optional().describe('The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status its failure is read as rather than a status the process returned.'),
546
546
  'incompatible': z.array(z.object({
547
547
  'name': z.string(),
548
548
  'version': z.string(),
@@ -652,7 +652,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
652
652
  description: '`cancelled` once the Git check or pnpm exited and the files are restored, `too-late` once the bundle is being applied, `not-running` for any other id.',
653
653
  jsonSchema: {"type":"object","properties":{"status":{"type":"string","enum":["cancelled","not-running","too-late"]}},"required":["status"],"additionalProperties":true},
654
654
  },
655
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1018,"column":9},
655
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1030,"column":9},
656
656
  },
657
657
  'pluginManager/inspect': {
658
658
  service: 'pluginManager',
@@ -703,11 +703,11 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
703
703
  description: 'The package the spec names, or why it is refused.',
704
704
  jsonSchema: {"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"accepted"},"kind":{"type":"string","enum":["registry","path","git","tarball"]},"name":{"type":"string"},"version":{"type":"string"},"description":{"type":"string","description":"`description` of the package manifest."},"bundle":{"oneOf":[{"type":"null","const":null},{"type":"boolean","enum":[false,true]}],"description":"Whether the package declares a bundle patch; null when the spec's form does not say."},"registry":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The registry that answered for a name, and for the other forms the one an install of the spec asks first."},"host":{"type":"string","description":"The host a git spec or a tarball URL is fetched from, which no registry stands in for."}},"required":["status","kind","bundle","registry"],"additionalProperties":true},{"type":"object","properties":{"status":{"type":"string","const":"refused"},"problem":{"type":"string","enum":["network","unknown","not-found","invalid-spec","already-installed","not-a-package","not-a-bundle"]},"reason":{"type":"string","description":"What pnpm, the registry, or the file system said."},"registries":{"type":"array","items":{"oneOf":[{"type":"null","const":null},{"type":"string"}]},"description":"The registries asked, in order, when the refusal came from asking them; `reason` is the last one's."}},"required":["status","problem","reason"],"additionalProperties":true}]},
705
705
  },
706
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":602,"column":9},
706
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":603,"column":9},
707
707
  },
708
708
  'pluginManager/installBundle': {
709
709
  service: 'pluginManager',
710
- description: 'Install a package using the same pnpm implementation as dsh plugin. GitHub repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts; only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. An HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs find that only SSH can read it. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.',
710
+ description: 'Install a package using the same pnpm implementation as dsh plugin. GitHub repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts; only network failures or timeouts stop installation, and a stop streams the check\'s diagnostic as the installation\'s install-log run under its request id, while pnpm owns authentication and transport fallback. An HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs find that only SSH can read it. A run that fails, is cancelled, or adds a package without a bundle patch restores `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.',
711
711
  invocation: { kind: 'direct' },
712
712
  parameters: [
713
713
  {
@@ -753,7 +753,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
753
753
  description: 'Package-manager diagnostics, the registries asked, and the observed activation outcome.',
754
754
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
755
755
  },
756
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":871,"column":3},
756
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":873,"column":3},
757
757
  },
758
758
  'pluginManager/listBundles': {
759
759
  service: 'pluginManager',
@@ -849,7 +849,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
849
849
  description: 'At most `versionListLimit` newer versions, newest first, with their tags, deprecation, bundle declaration, and DSH compatibility, and the registry that answered; or why no list could be read, with every registry asked.',
850
850
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
851
851
  },
852
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":662,"column":9},
852
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":663,"column":9},
853
853
  },
854
854
  'pluginManager/readBundleDetail': {
855
855
  service: 'pluginManager',
@@ -931,7 +931,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
931
931
  description: 'The registries in pnpm\'s comparison form; null is the one pnpm\'s own configuration names, `resolved` as pnpm reads it now.',
932
932
  jsonSchema: {"type":"object","properties":{"registry":{"oneOf":[{"type":"null","const":null},{"type":"string"}]},"fallbackRegistries":{"type":"array","items":{"type":"string"}},"resolved":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The URL pnpm's own configuration names in the profile, read from pnpm; null when it could not be read."}},"required":["registry","fallbackRegistries","resolved"],"additionalProperties":true},
933
933
  },
934
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":586,"column":9},
934
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":587,"column":9},
935
935
  },
936
936
  'pluginManager/removeBundle': {
937
937
  service: 'pluginManager',
@@ -963,7 +963,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
963
963
  description: 'Removal diagnostics and the remaining profile state.',
964
964
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
965
965
  },
966
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1035,"column":3},
966
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1047,"column":3},
967
967
  },
968
968
  'pluginManager/setBundleEnabled': {
969
969
  service: 'pluginManager',
@@ -1012,7 +1012,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
1012
1012
  description: 'Persisted and runtime outcomes.',
1013
1013
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1014
1014
  },
1015
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":850,"column":3},
1015
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":851,"column":3},
1016
1016
  },
1017
1017
  'pluginManager/setPluginEnabled': {
1018
1018
  service: 'pluginManager',
@@ -1061,7 +1061,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
1061
1061
  description: 'Saved and runtime outcomes, including higher-priority overrides.',
1062
1062
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1063
1063
  },
1064
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":832,"column":3},
1064
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":833,"column":3},
1065
1065
  },
1066
1066
  'pluginManager/setVersionExemption': {
1067
1067
  service: 'pluginManager',
@@ -1212,7 +1212,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
1212
1212
  description: 'The versions, the last step that ran with its result, and the reinstallation when one ran.',
1213
1213
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1214
1214
  },
1215
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":713,"column":9},
1215
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":714,"column":9},
1216
1216
  },
1217
1217
  'pluginManager/waitForInstall': {
1218
1218
  service: 'pluginManager',
@@ -1244,7 +1244,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
1244
1244
  description: 'The installation\'s outcome after it settles, or null if no active request has that id. Completed results are not retained; null establishes neither success nor cancellation.',
1245
1245
  jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
1246
1246
  },
1247
- sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1008,"column":9},
1247
+ sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1020,"column":9},
1248
1248
  },
1249
1249
  },
1250
1250
  }, z)
@@ -1,5 +1,16 @@
1
- import type { ParsedInstallSpec } from './install-spec.ts';
1
+ import { type ParsedInstallSpec } from './install-spec.ts';
2
2
  import type { PackageResult } from './types.ts';
3
+ /**
4
+ * A failed check, with the Git command line the install dialog shows as the installation's only run.
5
+ * The returned result itself stays a plain {@link PackageResult}: the command line never joins the wire fields.
6
+ */
7
+ export interface GithubConnectionFailure extends PackageResult {
8
+ /**
9
+ * The `git` command line the check ran, with the user information of an http(s) repository URL removed:
10
+ * `git -c credential.helper= ls-remote -- <repository> HEAD`.
11
+ */
12
+ readonly argv: readonly string[];
13
+ }
3
14
  /** Deadline, diagnostics and cancellation for one read-only GitHub check. */
4
15
  export interface GithubConnectionOptions {
5
16
  timeoutMs: number;
@@ -15,7 +26,8 @@ export interface GithubConnectionOptions {
15
26
  * @param spec The parsed installation address; npm packages, local paths and other hosts are not checked.
16
27
  * @param dir The profile directory where installation runs.
17
28
  * @param options The connection deadline, output bound and operation cancellation.
18
- * @returns A failed check with bounded output and a complete log at logPath, or undefined for a reachable repository or an unhandled spec.
29
+ * @returns A failed check carrying the command line it ran (without URL user information) and its bounded output, with a
30
+ * complete log at logPath, or undefined for a reachable repository or an unhandled spec.
19
31
  */
20
- export declare function checkGithubConnection(spec: ParsedInstallSpec, dir: string, options: GithubConnectionOptions): Promise<PackageResult | undefined>;
32
+ export declare function checkGithubConnection(spec: ParsedInstallSpec, dir: string, options: GithubConnectionOptions): Promise<GithubConnectionFailure | undefined>;
21
33
  //# sourceMappingURL=github-connection.d.ts.map
@@ -4,6 +4,7 @@ import { join } from 'node:path';
4
4
  import { execa } from 'execa';
5
5
  import { scrubbedParentEnv } from '@deepseek-ai/dsh-subprocess';
6
6
  import { classifyInstallFailure } from "./install-failure.js";
7
+ import { HTTP_USER_INFO } from "./install-spec.js";
7
8
  /**
8
9
  * Check a GitHub repository before pnpm starts, without downloading or building its package.
9
10
  * Git reads the profile's Git and proxy configuration without invoking credential helpers or prompting.
@@ -11,7 +12,8 @@ import { classifyInstallFailure } from "./install-failure.js";
11
12
  * @param spec The parsed installation address; npm packages, local paths and other hosts are not checked.
12
13
  * @param dir The profile directory where installation runs.
13
14
  * @param options The connection deadline, output bound and operation cancellation.
14
- * @returns A failed check with bounded output and a complete log at logPath, or undefined for a reachable repository or an unhandled spec.
15
+ * @returns A failed check carrying the command line it ran (without URL user information) and its bounded output, with a
16
+ * complete log at logPath, or undefined for a reachable repository or an unhandled spec.
15
17
  */
16
18
  export async function checkGithubConnection(spec, dir, options) {
17
19
  if (spec.kind !== 'git')
@@ -28,8 +30,12 @@ export async function checkGithubConnection(spec, dir, options) {
28
30
  const logDir = await mkdtemp(join(logRoot, 'github-connection-'));
29
31
  const logPath = join(logDir, 'git.log');
30
32
  const log = await open(logPath, 'ax+', 0o600);
33
+ const argv = ['git', '-c', 'credential.helper=', 'ls-remote', '--', repository, 'HEAD'];
34
+ // The executed command keeps any credentials the spec names; the recorded one drops them before it is displayed.
35
+ const recordedArgv = argv.map(argument => argument.replace(HTTP_USER_INFO, '$1'));
36
+ const [command, ...args] = argv;
31
37
  try {
32
- const result = await execa('git', ['-c', 'credential.helper=', 'ls-remote', '--', repository, 'HEAD'], {
38
+ const result = await execa(command, args, {
33
39
  cwd: dir,
34
40
  env: {
35
41
  ...scrubbedParentEnv(), ...options.env, LC_ALL: 'C', GIT_TERMINAL_PROMPT: '0',
@@ -49,9 +55,13 @@ export async function checkGithubConnection(spec, dir, options) {
49
55
  const bytes = Buffer.alloc(Math.min(size, options.outputBytes));
50
56
  await log.read(bytes, 0, bytes.length, size - bytes.length);
51
57
  const output = bytes.toString('utf8');
58
+ // `PackageResult.exitCode` is a status number, so a Git the deadline stopped records the status its failure is read
59
+ // as. The run streamed for the same failure reports no exit code, because that process ended without one.
52
60
  return {
53
- exitCode: result.exitCode ?? (result.code === 'ENOENT' ? 127 : 1), output, truncated: size > options.outputBytes, logPath,
61
+ argv: recordedArgv, exitCode: result.exitCode ?? (result.code === 'ENOENT' ? 127 : 1),
62
+ output, truncated: size > options.outputBytes, logPath,
54
63
  kind: classifyInstallFailure({ log: output, timedOut: result.timedOut }),
64
+ ...result.timedOut ? { timedOut: true } : {},
55
65
  };
56
66
  }
57
67
  finally {
@@ -194,7 +194,8 @@ export declare class PluginManager extends TypertRemoteService {
194
194
  /**
195
195
  * Install a package using the same pnpm implementation as dsh plugin. GitHub
196
196
  * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;
197
- * only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. An
197
+ * only network failures or timeouts stop installation, and a stop streams the check's diagnostic
198
+ * as the installation's install-log run under its request id, while pnpm owns authentication and transport fallback. An
198
199
  * HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs
199
200
  * find that only SSH can read it. A run
200
201
  * that fails, is cancelled, or adds a package without a bundle patch restores
@@ -509,6 +509,7 @@ let PluginManager = (() => {
509
509
  }
510
510
  const error = platformError ?? targetError ?? (enabled ? { code: 'not-bundle' } : undefined);
511
511
  bundles.push({ name, official, availability: 'missing', ...catalogMeta, ...target, enabled, installed, optional,
512
+ ...offered.listedByDefault === undefined ? {} : { listedByDefault: offered.listedByDefault },
512
513
  ...platformError?.code === 'unsupported-platform' ? { listedByDefault: false } : {},
513
514
  removable: enabled, rows: [], overrides: [],
514
515
  ...error === undefined ? {} : { error } });
@@ -874,7 +875,8 @@ let PluginManager = (() => {
874
875
  /**
875
876
  * Install a package using the same pnpm implementation as dsh plugin. GitHub
876
877
  * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;
877
- * only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. An
878
+ * only network failures or timeouts stop installation, and a stop streams the check's diagnostic
879
+ * as the installation's install-log run under its request id, while pnpm owns authentication and transport fallback. An
878
880
  * HTTP(S) Git URL on another host is installed over SSH instead when access probes bounded by gitTransportTimeoutMs
879
881
  * find that only SSH can read it. A run
880
882
  * that fails, is cancelled, or adds a package without a bundle patch restores
@@ -931,8 +933,18 @@ let PluginManager = (() => {
931
933
  if (stopped())
932
934
  throw new InstallCancelledError();
933
935
  if (connectionFailure?.kind === 'network' || connectionFailure?.kind === 'timeout') {
934
- result.packageResult = connectionFailure;
936
+ // The answer keeps a plain PackageResult; the check's command line is only streamed as the run below.
937
+ const { argv, ...packageResult } = connectionFailure;
938
+ result.packageResult = packageResult;
935
939
  result.failedAt = 'spec-host';
940
+ // pnpm never runs, so the check is the installation's only run: stream its failure into the install log.
941
+ // A timed-out Git reports no exit code of its own, unlike the result, which records the status it is read as.
942
+ if (requestId !== undefined) {
943
+ this.ownerContext.emit('plugin-manager/install-log', {
944
+ requestId, jobId: randomUUID(), argv, cwd: this.profile.dir, stream: 'stderr',
945
+ text: connectionFailure.output, exitCode: connectionFailure.timedOut === true ? null : connectionFailure.exitCode,
946
+ });
947
+ }
936
948
  throw new Error(connectionFailure.output);
937
949
  }
938
950
  const transport = chooseGitTransport(parsed, this.profile.dir, { timeoutMs: this.gitTransportTimeoutMs, signal, ...env });
@@ -47,6 +47,8 @@ export declare class InvalidInstallSpecError extends Error {
47
47
  * registry would refuse, or a URL that is neither a git host nor a tarball.
48
48
  */
49
49
  export declare function parseInstallSpec(raw: string): ParsedInstallSpec;
50
+ /** The user information of an http(s) URL, up to the last `@` before the path, which holds a password or access token when present. */
51
+ export declare const HTTP_USER_INFO: RegExp;
50
52
  /**
51
53
  * The spec `pnpm add` accepts for a dependency the profile manifest records. A git address, URL, or other
52
54
  * non-registry protocol is the recorded value without the user information of an http(s) URL, whose query string
@@ -88,7 +88,7 @@ export function parseInstallSpec(raw) {
88
88
  /** A recorded dependency value pnpm resolves outside a registry: a protocol other than a registry alias, or an scp-like git address. */
89
89
  const NON_REGISTRY_VALUE = /^(?!(?:npm|jsr|workspace|catalog):)[a-z][a-z0-9+.-]*:|^[^@/:\s]+@[^:/\s]+:/i;
90
90
  /** The user information of an http(s) URL, up to the last `@` before the path, which holds a password or access token when present. */
91
- const HTTP_USER_INFO = /^((?:git\+)?https?:\/\/)[^/]*@/i;
91
+ export const HTTP_USER_INFO = /^((?:git\+)?https?:\/\/)[^/]*@/i;
92
92
  /**
93
93
  * The spec `pnpm add` accepts for a dependency the profile manifest records. A git address, URL, or other
94
94
  * non-registry protocol is the recorded value without the user information of an http(s) URL, whose query string
@@ -507,6 +507,8 @@ export async function runProfilePnpm(context, args, options) {
507
507
  if (result.failed && output.length === 0) {
508
508
  const diagnostic = result.shortMessage ?? 'pnpm failed';
509
509
  await log.write(diagnostic);
510
+ // The run printed nothing, so this diagnostic is the whole of its captured output; stream it as such.
511
+ options.onOutput?.(diagnostic, 'stderr');
510
512
  truncated = Buffer.byteLength(diagnostic) > options.outputBytes;
511
513
  output = Buffer.from(diagnostic).subarray(0, options.outputBytes);
512
514
  }
@@ -128,13 +128,18 @@ export interface PluginRegistries {
128
128
  export type PluginInstallFailureKind = 'pnpm-missing' | 'timeout' | 'not-found' | 'no-matching-version' | 'network' | 'disk-full' | 'permission' | 'build-blocked' | 'integrity' | 'unknown';
129
129
  /** Package operation completion, including Git checks and a retrieval path for unabridged diagnostics. */
130
130
  export interface PackageResult {
131
+ /** The status the run is read as having ended with; a run the manager terminated records the coerced status 1. */
131
132
  exitCode: number;
132
133
  output: string;
133
134
  truncated: boolean;
134
135
  logPath: string;
135
136
  /** Present when the run failed: what kind of failure its exit and output describe. */
136
137
  kind?: PluginInstallFailureKind;
137
- /** The manager terminated the run after it printed nothing for its silence bound; `exitCode` still reports how it ended. */
138
+ /**
139
+ * The run outlived its bound: the manager terminated it after it printed nothing for its silence bound, or the GitHub
140
+ * connection check hit its deadline. Such a run reports no exit status of its own, so `exitCode` records the status
141
+ * its failure is read as rather than a status the process returned.
142
+ */
138
143
  timedOut?: boolean;
139
144
  /** Present when a compatibility check refused the run: the packages the running DSH version rejects. */
140
145
  incompatible?: IncompatiblePlugin[];
@@ -308,19 +313,19 @@ export interface PluginInstallProgress {
308
313
  export interface PluginInstallCancellation {
309
314
  readonly status: 'cancelled' | 'too-late' | 'not-running';
310
315
  }
311
- /** One chunk of a pnpm run's output, as the run produces it. */
316
+ /** One chunk of an installation run's output: a pnpm run, or the GitHub connection check that stopped it. */
312
317
  export interface PluginInstallLogChunk {
313
318
  /** The installation the run belongs to, when its caller supplied a request id. */
314
319
  readonly requestId?: PluginInstallRequestId;
315
320
  /** The run the chunk belongs to. */
316
321
  readonly jobId: string;
317
- /** The command line the run executes: pnpm's command name, then its arguments. */
322
+ /** The command line the run executes: its command name, then its arguments. */
318
323
  readonly argv: readonly string[];
319
324
  /** The directory the run executes in: the profile directory. */
320
325
  readonly cwd: string;
321
326
  readonly stream: 'stdout' | 'stderr';
322
327
  readonly text: string;
323
- /** Present on the run's last chunk: pnpm's exit code, null when it ended without one. */
328
+ /** Present on the chunk that ends a run: its exit code, null when the run ended without one. */
324
329
  readonly exitCode?: number | null;
325
330
  }
326
331
  /**
@@ -386,7 +391,7 @@ declare module '@deepseek-ai/cordis' {
386
391
  */
387
392
  'plugin-manager/changed'(change: PluginChange): void;
388
393
  /**
389
- * One chunk of a pnpm run's output, streamed as the run produces it.
394
+ * One chunk of an installation run's output, streamed as the run produces it.
390
395
  * @mode emit
391
396
  * @param chunk - the chunk and the run it belongs to.
392
397
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-plugin-manager",
3
3
  "description": "Current-profile plugin and bundle management shared by dsh CLI, Web and agent tools",
4
- "version": "0.2.2-alpha.2",
4
+ "version": "0.2.2-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -64,31 +64,31 @@
64
64
  ],
65
65
  "license": "MIT",
66
66
  "dependencies": {
67
- "@deepseek-ai/dsh-app-boot": "0.2.2-alpha.2",
68
- "@deepseek-ai/dsh-atomic-write": "0.2.2-alpha.2",
69
- "@deepseek-ai/dsh-official-bundles": "0.2.2-alpha.2",
70
- "@deepseek-ai/schemastery": "~3.18.6-alpha.1",
67
+ "@deepseek-ai/dsh-app-boot": "0.2.2-alpha.3",
68
+ "@deepseek-ai/dsh-atomic-write": "0.2.2-alpha.3",
69
+ "@deepseek-ai/dsh-official-bundles": "0.2.2-alpha.3",
70
+ "@deepseek-ai/schemastery": "~3.18.6-alpha.2",
71
71
  "execa": "^10.0.1",
72
72
  "semver": "^7.8.5",
73
73
  "yaml": "^2.9.0",
74
74
  "zod": "4.4.3",
75
- "@deepseek-ai/dsh-util-values": "0.2.2-alpha.2",
76
- "@deepseek-ai/dsh-plugin-detail": "0.2.2-alpha.2",
77
- "@deepseek-ai/dsh-timeout": "0.2.2-alpha.2",
75
+ "@deepseek-ai/dsh-util-values": "0.2.2-alpha.3",
76
+ "@deepseek-ai/dsh-plugin-detail": "0.2.2-alpha.3",
77
+ "@deepseek-ai/dsh-timeout": "0.2.2-alpha.3",
78
78
  "hosted-git-info": "^9.0.3"
79
79
  },
80
80
  "peerDependencies": {
81
- "@deepseek-ai/cordis": "~4.0.6-alpha.1",
82
- "@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.1",
83
- "@deepseek-ai/dsh-host-plugin-inventory": "0.2.2-alpha.2",
84
- "@deepseek-ai/dsh-subprocess": "0.2.2-alpha.2",
85
- "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.2",
86
- "@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
87
- "@deepseek-ai/dsh-hmr": "0.2.2-alpha.2",
88
- "@deepseek-ai/dsh-brand": "0.2.2-alpha.2",
89
- "@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.2",
90
- "@deepseek-ai/dsh-sandbox": "0.2.2-alpha.2",
91
- "@deepseek-ai/dsh-user-approval": "0.2.2-alpha.2"
81
+ "@deepseek-ai/cordis": "~4.0.6-alpha.2",
82
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
83
+ "@deepseek-ai/dsh-host-plugin-inventory": "0.2.2-alpha.3",
84
+ "@deepseek-ai/dsh-subprocess": "0.2.2-alpha.3",
85
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.3",
86
+ "@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
87
+ "@deepseek-ai/dsh-hmr": "0.2.2-alpha.3",
88
+ "@deepseek-ai/dsh-brand": "0.2.2-alpha.3",
89
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.3",
90
+ "@deepseek-ai/dsh-sandbox": "0.2.2-alpha.3",
91
+ "@deepseek-ai/dsh-user-approval": "0.2.2-alpha.3"
92
92
  },
93
93
  "peerDependenciesMeta": {
94
94
  "@deepseek-ai/dsh-hmr": {
@@ -101,26 +101,26 @@
101
101
  "devDependencies": {
102
102
  "chokidar": "^4.0.3",
103
103
  "@types/semver": "^7.8.0",
104
- "@deepseek-ai/dsh-package-manifest": "0.2.2-alpha.2",
105
- "@deepseek-ai/cordis": "~4.0.6-alpha.1",
106
- "@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.1",
107
- "@deepseek-ai/dsh-host-plugin-inventory": "0.2.2-alpha.2",
108
- "@deepseek-ai/dsh-subprocess": "0.2.2-alpha.2",
109
- "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.2",
110
- "@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.2",
111
- "@deepseek-ai/dsh-tool-testkit": "0.2.2-alpha.2",
112
- "@deepseek-ai/dsh-tools": "0.2.2-alpha.2",
113
- "@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.2",
114
- "@deepseek-ai/dsh-hmr": "0.2.2-alpha.2",
115
- "@deepseek-ai/cordis-plugin-timer": "~1.1.8-alpha.1",
116
- "@deepseek-ai/dsh-brand": "0.2.2-alpha.2",
117
- "@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.2",
118
- "@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
119
- "@deepseek-ai/dsh-session": "0.2.2-alpha.2",
120
- "@deepseek-ai/dsh-session-projection": "0.2.2-alpha.2",
121
- "@deepseek-ai/dsh-sandbox": "0.2.2-alpha.2",
122
- "@deepseek-ai/dsh-user-approval": "0.2.2-alpha.2",
123
- "@deepseek-ai/dsh-client-connection": "0.2.2-alpha.2",
104
+ "@deepseek-ai/dsh-package-manifest": "0.2.2-alpha.3",
105
+ "@deepseek-ai/cordis": "~4.0.6-alpha.2",
106
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.7-alpha.2",
107
+ "@deepseek-ai/dsh-host-plugin-inventory": "0.2.2-alpha.3",
108
+ "@deepseek-ai/dsh-subprocess": "0.2.2-alpha.3",
109
+ "@deepseek-ai/dsh-typert-protocol": "0.2.2-alpha.3",
110
+ "@deepseek-ai/dsh-tool-executor-native": "0.2.2-alpha.3",
111
+ "@deepseek-ai/dsh-tool-testkit": "0.2.2-alpha.3",
112
+ "@deepseek-ai/dsh-tools": "0.2.2-alpha.3",
113
+ "@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.3",
114
+ "@deepseek-ai/dsh-hmr": "0.2.2-alpha.3",
115
+ "@deepseek-ai/cordis-plugin-timer": "~1.1.8-alpha.2",
116
+ "@deepseek-ai/dsh-brand": "0.2.2-alpha.3",
117
+ "@deepseek-ai/dsh-sandbox-policy": "0.2.2-alpha.3",
118
+ "@deepseek-ai/dsh-agent": "0.2.2-alpha.3",
119
+ "@deepseek-ai/dsh-session": "0.2.2-alpha.3",
120
+ "@deepseek-ai/dsh-session-projection": "0.2.2-alpha.3",
121
+ "@deepseek-ai/dsh-sandbox": "0.2.2-alpha.3",
122
+ "@deepseek-ai/dsh-user-approval": "0.2.2-alpha.3",
123
+ "@deepseek-ai/dsh-client-connection": "0.2.2-alpha.3",
124
124
  "@types/hosted-git-info": "^3.0.5"
125
125
  }
126
126
  }