@deepseek-ai/dsh-plugin-manager 0.1.7-alpha.1 → 0.1.7-alpha.2

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
@@ -2,5 +2,5 @@
2
2
  # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
3
  # after editing either side, bring the other along and re-record with:
4
4
  # pnpm run verify-translation-pairing --write packages/boot/plugin-manager/README.md
5
- README.md: d937d265a7942f824f5f4a02c0a5eaba62208994
6
- README.zh.md: 388a2e249613299753ae63c3c20d2ca89311dc4f
5
+ README.md: 1de9c9d78e421d44eb006f1ab7fd82656f006a2a
6
+ README.zh.md: f7502aab64738ad1feccf58b84ff945213df2eff
package/README.md CHANGED
@@ -47,6 +47,8 @@ A selected bundle that cannot load remains in `listBundles` with an `error`; `en
47
47
 
48
48
  Registries are asked in turn. The plan starts at `options.registry`, else the configured `registry` (`null` is the one pnpm's own configuration names), and continues through `fallbackRegistries` while a registry is unreachable, times out, or answers that it has no such package or version, which a mirror not yet synced does. A registry outside the configured set is asked alone, so a private registry never falls through to a public one; pnpm's own registry counts as part of the set only while what it names, read through `pnpm config get registry` before each plan, is npm's own registry or one of the fallbacks, and is otherwise asked alone as a private one. A registry pnpm's own configuration already names is asked once. The lookup runs `pnpm view` with `--registry` and without pnpm's own retries, so a dead registry is reported within `inspectTimeoutMs` and the next one is asked; pnpm prints its refusal as JSON on stdout, which is read like stderr. The install keeps pnpm's retry settings. `registries()` answers the configured set and what pnpm names, for a picker. The [registry Agent Note](../../../.agents/notes/implemented/architecture/2026-09-18-plugin-install-registries.md) owns the rationale.
49
49
 
50
+ The browser-safe `@deepseek-ai/dsh-plugin-manager/registry` entry exports `OFFICIAL_NPM_REGISTRY` and `NPMMIRROR_REGISTRY` for consumers that identify those public registries.
51
+
50
52
  `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 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, and `bundle` names the package a finished run added. `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.
51
53
 
52
54
  `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.
package/README.zh.md CHANGED
@@ -47,6 +47,8 @@ kind: "package-reference"
47
47
 
48
48
  注册表按顺序询问。计划从 `options.registry` 开始,否则从配置的 `registry`(`null` 即 pnpm 自身配置指定的那个)开始,并在一个注册表不可达、超时或答复没有这个包或版本(尚未同步的镜像会如此)时继续问 `fallbackRegistries`。配置集合之外的注册表只问它自己,因而私有源永远不会落到公共源;pnpm 自身的注册表只在它指向的地址(每次做计划前经 `pnpm config get registry` 读出)是 npm 官方源或某个备选源时才算集合成员,否则视为私有源只问它自己。pnpm 自身配置已经指向的注册表只问一次。查询以 `--registry` 运行 `pnpm view` 且不带 pnpm 自身的重试,所以死掉的注册表会在 `inspectTimeoutMs` 内报告并转问下一个;pnpm 把拒绝以 JSON 打印在 stdout,读法与 stderr 相同。安装保留 pnpm 的重试设置。`registries()` 把配置集合和 pnpm 指向的地址答复给选择器。[注册表 Agent Note](../../../.agents/notes/implemented/architecture/2026-09-18-plugin-install-registries.zh.md) 拥有理由。
49
49
 
50
+ 可在浏览器使用的 `@deepseek-ai/dsh-plugin-manager/registry` 入口导出 `OFFICIAL_NPM_REGISTRY` 和 `NPMMIRROR_REGISTRY`,供消费方识别这两个公共注册表。
51
+
50
52
  `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)` 停止运行,只在 pnpm 退出且文件恢复后答复 `cancelled`,组合包已在应用时答复 `too-late`,其他 id 答复 `not-running`;安装调用随后报告 `application: 'cancelled'`。失败、被取消或装入了没有组合包 patch 的包的运行,会把 `package.json` 与 `pnpm-lock.yaml` 恢复原样;`packageResult.kind` 按退出方式与输出对最后一次运行分类,`registries` 列出问过的每个注册表,`bundle` 给出完成的运行新增的包。`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 或手工编辑后)不发通知,页面要到下一次读取才知道。
51
53
 
52
54
  `waitForInstall(requestId)` 让客户端在响应丢失后等待活动安装的结果,包括不可取消的应用阶段。它返回与原调用相同的结果,请求不在活动中时返回 `null`。已完成的结果不保留;`null` 不表示成功或已取消。
package/lib/index.js CHANGED
@@ -363,6 +363,8 @@ function parseInstallSpec(raw) {
363
363
  range
364
364
  };
365
365
  }
366
+ /** Public npmmirror URL shared by the fallback configuration and public-registry comparison. */
367
+ const NPMMIRROR_REGISTRY = "https://registry.npmmirror.com/";
366
368
  /**
367
369
  * Parse a registry URL into the form pnpm compares registries in: lower-case host, trailing slash.
368
370
  * @param url - the registry as configured or requested.
@@ -829,7 +831,7 @@ let PluginManager = (() => {
829
831
  lockWaitMs: z.number().step(1).min(0).default(12e4),
830
832
  inspectTimeoutMs: z.number().step(1).min(1e3).default(2e4),
831
833
  registry: z.string().pattern(REGISTRY_URL),
832
- fallbackRegistries: z.array(z.string().pattern(REGISTRY_URL)).default(["https://registry.npmmirror.com/"])
834
+ fallbackRegistries: z.array(z.string().pattern(REGISTRY_URL)).default([NPMMIRROR_REGISTRY])
833
835
  });
834
836
  /** Management bundles remain protected if their files become unreadable. */
835
837
  managementBundles = (__runInitializers(this, _instanceExtraInitializers), /* @__PURE__ */ new Set());
@@ -46,7 +46,7 @@ import { readPluginMeta, readProfileManifest, resolveBundleDir, loadOverlayPatch
46
46
  import { bundleManifest, readProfileRegistry, registryArguments, runProfilePnpm, saveManifest, viewProfilePackage } from "./operations.js";
47
47
  import { classifyInstallFailure } from "./install-failure.js";
48
48
  import { InvalidInstallSpecError, parseInstallSpec } from "./install-spec.js";
49
- import { attributeFailure, normalizeRegistry, registryPlan } from "./registry.js";
49
+ import { attributeFailure, normalizeRegistry, NPMMIRROR_REGISTRY, registryPlan } from "./registry.js";
50
50
  import { writePluginEnabled } from "./patch.js";
51
51
  import { ManagementFailure } from "./failure.js";
52
52
  import { approveBuilds, readPendingBuilds } from "./build-approval.js";
@@ -182,7 +182,7 @@ let PluginManager = (() => {
182
182
  lockWaitMs: z.number().step(1).min(0).default(120000),
183
183
  inspectTimeoutMs: z.number().step(1).min(1000).default(20000),
184
184
  registry: z.string().pattern(REGISTRY_URL),
185
- fallbackRegistries: z.array(z.string().pattern(REGISTRY_URL)).default(['https://registry.npmmirror.com/']),
185
+ fallbackRegistries: z.array(z.string().pattern(REGISTRY_URL)).default([NPMMIRROR_REGISTRY]),
186
186
  });
187
187
  /** Management bundles remain protected if their files become unreadable. */
188
188
  managementBundles = (__runInitializers(this, _instanceExtraInitializers), new Set());
@@ -10,6 +10,8 @@ import type { ParsedInstallSpec } from './install-spec.ts';
10
10
  import type { PluginInstallFailureKind, PluginRegistries, Registry } from './types.ts';
11
11
  /** npm's own registry: what pnpm names without any configuration, and the one public registry a plan trusts as such. */
12
12
  export declare const OFFICIAL_NPM_REGISTRY = "https://registry.npmjs.org/";
13
+ /** Public npmmirror URL shared by the fallback configuration and public-registry comparison. */
14
+ export declare const NPMMIRROR_REGISTRY = "https://registry.npmmirror.com/";
13
15
  /** An http(s) URL, as pnpm's `--registry` takes it. */
14
16
  export declare const REGISTRY_URL: RegExp;
15
17
  /**
@@ -8,6 +8,8 @@
8
8
  */
9
9
  /** npm's own registry: what pnpm names without any configuration, and the one public registry a plan trusts as such. */
10
10
  export const OFFICIAL_NPM_REGISTRY = 'https://registry.npmjs.org/';
11
+ /** Public npmmirror URL shared by the fallback configuration and public-registry comparison. */
12
+ export const NPMMIRROR_REGISTRY = 'https://registry.npmmirror.com/';
11
13
  /** An http(s) URL, as pnpm's `--registry` takes it. */
12
14
  export const REGISTRY_URL = /^https?:\/\/\S+$/;
13
15
  /**
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.1.7-alpha.1",
4
+ "version": "0.1.7-alpha.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -59,23 +59,23 @@
59
59
  "execa": "^10.0.0",
60
60
  "yaml": "^2.9.0",
61
61
  "zod": "^4.4.3",
62
- "@deepseek-ai/dsh-app-boot": "^0.1.7-alpha.1",
63
- "@deepseek-ai/dsh-atomic-write": "^0.1.7-alpha.1",
64
- "@deepseek-ai/schemastery": "^3.18.3",
65
- "@deepseek-ai/dsh-util-values": "^0.1.7-alpha.1"
62
+ "@deepseek-ai/dsh-app-boot": "0.1.7-alpha.2",
63
+ "@deepseek-ai/dsh-atomic-write": "0.1.7-alpha.2",
64
+ "@deepseek-ai/schemastery": "~3.18.4",
65
+ "@deepseek-ai/dsh-util-values": "0.1.7-alpha.2"
66
66
  },
67
67
  "peerDependencies": {
68
- "@deepseek-ai/cordis": "^4.0.3",
69
- "@deepseek-ai/cordis-plugin-loader": "^1.0.4",
70
- "@deepseek-ai/dsh-host-plugin-inventory": "^0.1.7-alpha.1",
71
- "@deepseek-ai/dsh-subprocess": "^0.1.7-alpha.1",
72
- "@deepseek-ai/dsh-typert-protocol": "^0.1.7-alpha.1",
73
- "@deepseek-ai/dsh-tools": "^0.1.7-alpha.1",
74
- "@deepseek-ai/dsh-hmr": "^0.1.7-alpha.1",
75
- "@deepseek-ai/dsh-brand": "^0.1.7-alpha.1",
76
- "@deepseek-ai/dsh-sandbox-policy": "^0.1.7-alpha.1",
77
- "@deepseek-ai/dsh-sandbox": "^0.1.7-alpha.1",
78
- "@deepseek-ai/dsh-user-approval": "^0.1.7-alpha.1"
68
+ "@deepseek-ai/cordis": "~4.0.4",
69
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.5",
70
+ "@deepseek-ai/dsh-host-plugin-inventory": "0.1.7-alpha.2",
71
+ "@deepseek-ai/dsh-subprocess": "0.1.7-alpha.2",
72
+ "@deepseek-ai/dsh-typert-protocol": "0.1.7-alpha.2",
73
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
74
+ "@deepseek-ai/dsh-hmr": "0.1.7-alpha.2",
75
+ "@deepseek-ai/dsh-brand": "0.1.7-alpha.2",
76
+ "@deepseek-ai/dsh-sandbox-policy": "0.1.7-alpha.2",
77
+ "@deepseek-ai/dsh-sandbox": "0.1.7-alpha.2",
78
+ "@deepseek-ai/dsh-user-approval": "0.1.7-alpha.2"
79
79
  },
80
80
  "peerDependenciesMeta": {
81
81
  "@deepseek-ai/dsh-hmr": {
@@ -86,22 +86,22 @@
86
86
  }
87
87
  },
88
88
  "devDependencies": {
89
- "@deepseek-ai/dsh-package-manifest": "^0.1.7-alpha.1",
90
- "@deepseek-ai/cordis": "^4.0.3",
91
- "@deepseek-ai/cordis-plugin-loader": "^1.0.4",
92
- "@deepseek-ai/dsh-host-plugin-inventory": "^0.1.7-alpha.1",
93
- "@deepseek-ai/dsh-subprocess": "^0.1.7-alpha.1",
94
- "@deepseek-ai/dsh-typert-protocol": "^0.1.7-alpha.1",
95
- "@deepseek-ai/dsh-tools": "^0.1.7-alpha.1",
96
- "@deepseek-ai/dsh-system-prompt": "^0.1.7-alpha.1",
97
- "@deepseek-ai/dsh-hmr": "^0.1.7-alpha.1",
98
- "@deepseek-ai/cordis-plugin-timer": "^1.1.5",
99
- "@deepseek-ai/dsh-brand": "^0.1.7-alpha.1",
100
- "@deepseek-ai/dsh-session": "^0.1.7-alpha.1",
101
- "@deepseek-ai/dsh-session-projection": "^0.1.7-alpha.1",
102
- "@deepseek-ai/dsh-sandbox": "^0.1.7-alpha.1",
103
- "@deepseek-ai/dsh-user-approval": "^0.1.7-alpha.1",
104
- "@deepseek-ai/dsh-agent": "^0.1.7-alpha.1",
105
- "@deepseek-ai/dsh-sandbox-policy": "^0.1.7-alpha.1"
89
+ "@deepseek-ai/dsh-package-manifest": "0.1.7-alpha.2",
90
+ "@deepseek-ai/cordis": "~4.0.4",
91
+ "@deepseek-ai/dsh-host-plugin-inventory": "0.1.7-alpha.2",
92
+ "@deepseek-ai/dsh-subprocess": "0.1.7-alpha.2",
93
+ "@deepseek-ai/dsh-typert-protocol": "0.1.7-alpha.2",
94
+ "@deepseek-ai/dsh-tools": "0.1.7-alpha.2",
95
+ "@deepseek-ai/dsh-system-prompt": "0.1.7-alpha.2",
96
+ "@deepseek-ai/dsh-hmr": "0.1.7-alpha.2",
97
+ "@deepseek-ai/cordis-plugin-timer": "~1.1.6",
98
+ "@deepseek-ai/dsh-brand": "0.1.7-alpha.2",
99
+ "@deepseek-ai/dsh-sandbox-policy": "0.1.7-alpha.2",
100
+ "@deepseek-ai/dsh-agent": "0.1.7-alpha.2",
101
+ "@deepseek-ai/dsh-session": "0.1.7-alpha.2",
102
+ "@deepseek-ai/dsh-session-projection": "0.1.7-alpha.2",
103
+ "@deepseek-ai/dsh-sandbox": "0.1.7-alpha.2",
104
+ "@deepseek-ai/dsh-user-approval": "0.1.7-alpha.2",
105
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.5"
106
106
  }
107
107
  }