@deepseek-ai/dsh-app-boot 0.0.1-rc.1 → 0.0.1-rc.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/app-boot/README.md
5
- README.md: 1d56b2b6d22c08574f8e361955bee1dbe2aca601
6
- README.zh.md: 5429a1322d0311f03c7c43946753a290e28cd936
5
+ README.md: 4c82aa749edbeada0a344b0b119d1644544d9732
6
+ README.zh.md: 38298e091af4aa1b09c31dfa8141ce68fa1d3f50
package/README.md CHANGED
@@ -29,7 +29,7 @@ The Loader mounts entries concurrently, so a surface can already own the termina
29
29
 
30
30
  `cordis:group` is registered beside `cordis:include` so a composition can give one `isolate` realm to a provider and its consumers together. Both load through the ambient module pipeline rather than the included tree's own specifier resolution, which is what lets a composition outside this workspace — an agent preset under the Harness home — use a group row at all.
31
31
 
32
- Bare plugin specifiers in a config (`@deepseek-ai/dsh-*`, npm packages) resolve through the Cordis Loader's internal module loader. They resolve from the config directory by default; a closed runtime passes `bareModuleBaseUrl` to `boot` or `mountRootInclude` so its installed package tree remains authoritative even when the config lives inside another Node project. Relative specifiers always resolve against the config directory. Repository bins install Loader's optional `node-addon-require-builtin` peer; external callers must supply it or install plugins where plain Node import resolution can find them. The built `dsh-app-boot` artifact embeds the statically mounted Include implementation while leaving Loader external, so the include tree and host bind to one Loader peer. The `dsh` source launcher additionally maps manifest-declared workspace packages to their TypeScript source; its configuration gate requires every shipped raw/Web bare plugin to appear in the resolver manifest's `dependencies`.
32
+ Bare plugin specifiers in a config (`@deepseek-ai/dsh-*`, npm packages) resolve through the Cordis Loader's internal module loader. They resolve from the config directory by default; a closed runtime passes `bareModuleBaseUrl` to `boot` or `mountRootInclude` so its installed package tree remains authoritative even when the config lives inside another Node project. Relative specifiers always resolve against the config directory. Repository bins install Loader's optional `node-addon-require-builtin` peer; external callers must supply it or install plugins where plain Node import resolution can find them. The built `dsh-app-boot` artifact embeds the statically mounted Include implementation while leaving Loader external, so the include tree and host bind to one Loader peer. The `pnpm dsh` source path additionally maps manifest-declared workspace packages to their TypeScript source; its configuration gate requires every shipped raw/Web bare plugin to appear in the resolver manifest's `dependencies`.
33
33
 
34
34
  This package carries no loader hooks and no dev-mode surface. The [`dsh` app](../../../apps/cli/README.md) owns its Node source-launch hook and consumes these helpers for the boot sequence; built consumers continue to use plain Node package resolution.
35
35
 
@@ -42,7 +42,7 @@ User-level machine-local preferences also live in the Harness home:
42
42
  - **`.env`** — the product CLI's ordinary environment layers: the invoking directory's file outranks the Harness-home file, and both sit below the inherited environment. `loadLayeredEnv` snapshots each value's source, rejects [bootstrap-only file variables](../../../.agents/notes/implemented/architecture/2026-08-04-configuration-source-ownership.md#decision) case-insensitively, and materializes accepted values into `process.env` for Loader expressions and third-party libraries. Managed credentials live separately in [`.credentials.yaml`](../../credentials/credentials-local/README.md); a credential left in either `.env` remains a lower-priority fallback.
43
43
  - **`cordis.patch.yml`** (home level) and **`profiles/<name>/cordis.patch.yml`** — the user patch layers, applied after every bundle layer (per-profile first, then the home-level file, which therefore outranks it): an id-targeted patch replaces the named entry's whole `config` (restate unchanged fields), `insert` adds entries, and `!!js` expressions interpolate at mount. A patch naming an entry id absent from the composed tree is a stderr warning. An empty or comments-only file throws (it parses to nothing, not to a list); disable the layer with `[]`.
44
44
 
45
- Long-lived surfaces keep `cordis.patch.yml` live through `watchUserPatches`; one-shot runs read only the startup value. The watcher targets the exact path even when the file or immediate parent does not exist, serializes bursts, and recomposes the user patches inside the caller's layer order (bundle layers below, overlays above). A rejected read, parse, or Loader candidate leaves the last good tree running and the HMR service broadcasts `hmr/config-update-failed(filename, Error)` after logging it; observer failures are contained. Disposing the context closes the watcher and drains an active refresh.
45
+ Every profile boot keeps `cordis.patch.yml` live through `watchUserPatches` (a one-shot surface disposes the watcher through its bounded shutdown). The watcher targets the exact path even when the file or immediate parent does not exist, serializes bursts, and recomposes the user patches inside the caller's layer order (bundle layers below, overlays above). A rejected read, parse, or Loader candidate leaves the last good tree running and the HMR service broadcasts `hmr/config-update-failed(filename, Error)` after logging it; observer failures are contained. Disposing the context closes the watcher and drains an active refresh.
46
46
 
47
47
  ## Model Experience
48
48
 
package/README.zh.md CHANGED
@@ -29,7 +29,7 @@ Loader 并发挂载各个条目,因此当其他环节失败时,某个界面
29
29
 
30
30
  `cordis:group` 与 `cordis:include` 一并注册,使一份组装能把一个提供方与它的消费方放进同一个 `isolate` realm。两者都通过宿主的模块管线加载,而非被包含树自身的说明符解析,这正是让本工作区之外的组装——放在 Harness home 下的 agent preset——能够使用 group 行的原因。
31
31
 
32
- 配置中的裸插件 specifier(`@deepseek-ai/dsh-*`、npm 包)通过 Cordis Loader 的内部模块 loader 解析。默认情况下,它们从配置目录解析;封闭运行时会向 `boot` 或 `mountRootInclude` 传入 `bareModuleBaseUrl`,使已安装包树保持权威,即使配置位于另一个 Node 项目中也不受遮蔽。相对 specifier 始终以配置目录为基准解析。仓库 bin 会安装 Loader 的可选 peer `node-addon-require-builtin`;外部调用方必须提供该组件,或者把插件安装到普通 Node import 解析可以找到的位置。构建后的 `dsh-app-boot` 产物内嵌静态挂载的 Include 实现,但仍将 Loader 保持为外部依赖,因此 include 树与宿主会绑定到同一个 Loader peer。`dsh` 源码启动器还会将 manifest(元数据清单)声明的 workspace 包映射到其 TypeScript 源码;其配置门禁要求每个随附的原始/Web 裸插件都出现在解析所用 manifest 的 `dependencies` 中。
32
+ 配置中的裸插件 specifier(`@deepseek-ai/dsh-*`、npm 包)通过 Cordis Loader 的内部模块 loader 解析。默认情况下,它们从配置目录解析;封闭运行时会向 `boot` 或 `mountRootInclude` 传入 `bareModuleBaseUrl`,使已安装包树保持权威,即使配置位于另一个 Node 项目中也不受遮蔽。相对 specifier 始终以配置目录为基准解析。仓库 bin 会安装 Loader 的可选 peer `node-addon-require-builtin`;外部调用方必须提供该组件,或者把插件安装到普通 Node import 解析可以找到的位置。构建后的 `dsh-app-boot` 产物内嵌静态挂载的 Include 实现,但仍将 Loader 保持为外部依赖,因此 include 树与宿主会绑定到同一个 Loader peer。`pnpm dsh` 源码路径还会将 manifest(元数据清单)声明的 workspace 包映射到其 TypeScript 源码;其配置门禁要求每个随附的原始/Web 裸插件都出现在解析所用 manifest 的 `dependencies` 中。
33
33
 
34
34
  此包不包含 loader 钩子,也不提供开发模式接口。[`dsh` 应用](../../../apps/cli/README.md) 持有自己的 Node 源码启动钩子,并在启动序列中使用这些 helper;构建后的消费方仍使用普通 Node 包解析。
35
35
 
@@ -42,7 +42,7 @@ profile 是位于 `$DSH_HOME/profiles/<name>` 下的目录(Harness home 由 [`
42
42
  - **`.env`**:产品 CLI 的普通环境层;调用目录的文件优先于 Harness home 的文件,两者都低于继承环境。`loadLayeredEnv` 记录每个值的来源,按不区分大小写的方式拒绝 [bootstrap-only 文件变量](../../../.agents/notes/implemented/architecture/2026-08-04-configuration-source-ownership.md#decision),并把其余值物化进 `process.env`,供 Loader 表达式和第三方库使用。受管凭据另存于 [`.credentials.yaml`](../../credentials/credentials-local/README.md);留在任一 `.env` 中的凭据仍是低优先级后备值。
43
43
  - **`cordis.patch.yml`**(home 级)与 **`profiles/<name>/cordis.patch.yml`**:用户 patch 层,应用在所有组合包层之后(先应用逐 profile 的文件,再应用 home 级文件,因此后者优先级更高):按 id 定位的 patch 会替换对应条目的整个 `config`(未改字段也要重述),`insert` 会添加条目,`!!js` 表达式则在挂载时插值。如果 patch 指定的条目 id 不在组合后的树中,则输出一条 stderr 警告。空文件或仅含注释的文件会抛出异常(其解析结果为空,而不是列表);如需禁用该层,请使用 `[]`。
44
44
 
45
- 长期运行的界面会持续应用 `cordis.patch.yml` 的变更,具体由 `watchUserPatches` 负责;一次性运行只读取启动时的值。即使该文件或其直接父目录不存在,监视器仍会监视确切路径;它会串行处理突发变更,并按调用方的层次顺序重新组合用户 patch(组合包层在下、overlay 在上)。读取失败、解析失败或 Loader 候选被拒时,最后一个可用树会继续运行;HMR 服务记录错误后广播 `hmr/config-update-failed(filename, Error)`,并隔离观察方的失败。上下文 dispose 时会关闭 watcher,并等待进行中的刷新结束。
45
+ 每次 profile 启动都由 `watchUserPatches` 持续应用 `cordis.patch.yml` 的变更(一次性 surface 经由有界关闭 dispose 监视器)。即使该文件或其直接父目录不存在,监视器仍会监视确切路径;它会串行处理突发变更,并按调用方的层次顺序重新组合用户 patch(组合包层在下、overlay 在上)。读取失败、解析失败或 Loader 候选被拒时,最后一个可用树会继续运行;HMR 服务记录错误后广播 `hmr/config-update-failed(filename, Error)`,并隔离观察方的失败。上下文 dispose 时会关闭 watcher,并等待进行中的刷新结束。
46
46
 
47
47
  ## 模型体验
48
48
 
package/lib/index.js CHANGED
@@ -5,7 +5,7 @@ import { parseEnv } from "node:util";
5
5
  import { basename, dirname, extname, isAbsolute, join, resolve } from "node:path";
6
6
  import * as yaml from "js-yaml";
7
7
  import { Context, Service } from "@deepseek-ai/cordis";
8
- import Loader, { EntryConfigResolver, EntryTree, interpolate, isJsExpr } from "@deepseek-ai/cordis-plugin-loader";
8
+ import Loader, { EntryGroup, EntryTree, isJsExpr } from "@deepseek-ai/cordis-plugin-loader";
9
9
  import { access, constants, readFile, rename, writeFile } from "node:fs/promises";
10
10
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
11
11
  import Group from "@deepseek-ai/cordis-plugin-group";
@@ -116,20 +116,7 @@ var ConfigFileError = class extends Error {
116
116
  var Include = class extends EntryTree {
117
117
  config;
118
118
  static inject = ["loader"];
119
- /**
120
- * Resolve Include's own options while preserving nested entry expressions.
121
- * @param ctx - the Include plugin context.
122
- * @param config - the raw Include config.
123
- * @returns resolved Include options with `initial` and `patches` untouched.
124
- */
125
- static [EntryConfigResolver](ctx, config) {
126
- const { initial, patches, ...own } = config;
127
- return {
128
- ...interpolate(ctx, own),
129
- ...initial === void 0 ? {} : { initial },
130
- ...patches === void 0 ? {} : { patches }
131
- };
132
- }
119
+ static [EntryGroup.key] = true;
133
120
  filename;
134
121
  type;
135
122
  readonly;
@@ -667,6 +654,8 @@ const BOOTSTRAP_NAMES = new Set([
667
654
  "EDITOR",
668
655
  "VISUAL",
669
656
  "PAGER",
657
+ "DEEPSEEK_BASE_URL",
658
+ "DEEPSEEK_SEARCH_BASE_URL",
670
659
  "SSL_CERT_FILE",
671
660
  "SSL_CERT_DIR",
672
661
  "HTTP_PROXY",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-app-boot",
3
3
  "description": "Shared boot glue for the app bins: .env loading, fail-loud Loader guards, snapshot-aware config resolution, and the Loader boot sequence",
4
- "version": "0.0.1-rc.1",
4
+ "version": "0.0.1-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "restricted"
7
7
  },
@@ -35,15 +35,15 @@
35
35
  "js-yaml": "^4.2.0"
36
36
  },
37
37
  "peerDependencies": {
38
- "@deepseek-ai/cordis-plugin-group": "^1.0.1-rc.1",
39
38
  "@deepseek-ai/cordis-plugin-hmr": "^1.0.16-rc.1",
40
39
  "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1",
41
- "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
42
- "@deepseek-ai/dsh-environment": "^0.0.1-rc.1",
43
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
44
- "@deepseek-ai/dsh-paths": "^0.0.1-rc.1",
45
- "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.1",
46
- "@deepseek-ai/cordis": "^4.0.1-rc.1"
40
+ "@deepseek-ai/cordis-plugin-group": "^1.0.1-rc.1",
41
+ "@deepseek-ai/dsh-environment": "^0.0.1-rc.2",
42
+ "@deepseek-ai/dsh-paths": "^0.0.1-rc.2",
43
+ "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2",
44
+ "@deepseek-ai/cordis": "^4.0.1-rc.1",
45
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
46
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "@deepseek-ai/cordis-plugin-hmr": {
@@ -52,15 +52,15 @@
52
52
  },
53
53
  "devDependencies": {
54
54
  "@types/js-yaml": "^4.0.9",
55
- "@deepseek-ai/cordis-plugin-group": "^1.0.1-rc.1",
56
55
  "@deepseek-ai/cordis-plugin-hmr": "^1.0.16-rc.1",
57
- "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
58
- "@deepseek-ai/cordis-plugin-timer": "^1.1.3-rc.1",
59
- "@deepseek-ai/dsh-environment": "^0.0.1-rc.1",
60
56
  "@deepseek-ai/cordis-plugin-include": "^1.0.5-rc.1",
61
- "@deepseek-ai/dsh-invariants": "^0.0.1-rc.1",
62
- "@deepseek-ai/dsh-paths": "^0.0.1-rc.1",
63
- "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.1",
57
+ "@deepseek-ai/cordis-plugin-group": "^1.0.1-rc.1",
58
+ "@deepseek-ai/cordis-plugin-timer": "^1.1.3-rc.1",
59
+ "@deepseek-ai/dsh-environment": "^0.0.1-rc.2",
60
+ "@deepseek-ai/cordis-plugin-loader": "^1.0.1-rc.1",
61
+ "@deepseek-ai/dsh-invariants": "^0.0.1-rc.2",
62
+ "@deepseek-ai/dsh-paths": "^0.0.1-rc.2",
63
+ "@deepseek-ai/dsh-system-prompt": "^0.0.1-rc.2",
64
64
  "@deepseek-ai/cordis": "^4.0.1-rc.1"
65
65
  }
66
66
  }