@xneog/dsh-base 0.1.0 → 0.1.3-alpha.1

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/bundle/base/README.md
5
- README.md: 00a177d4dd65de8706aa0e27a79d06a9a50eb55a
6
- README.zh.md: ad70fc16035d3dd70b04e78c31aea90acf61119b
5
+ README.md: 53baff6631d678546a09c4cce31b415cff502888
6
+ README.zh.md: 1677e6e2ab45ef38f2843af5a5ad7fc5a4ea4e99
package/README.md CHANGED
@@ -1,22 +1,137 @@
1
- # `@xneog/dsh-base`
1
+ ---
2
+ description: "The shared dsh core: model access, tools, durable sessions, and safety defaults for every dsh --profile surface, for users composing or customizing a profile."
3
+ kind: "package-bundle"
4
+ ---
5
+
6
+ # @xneog/dsh-base
2
7
 
3
8
  English | [中文](README.zh.md)
4
9
 
5
- The shared dsh core as a profile bundle: [`cordis.patch.yml`](cordis.patch.yml) inserts every base plugin row — model adapters, the shared [`agent-default-model`](../../core/agent-default-model/README.md) selection, tools, persistence, policy, settings/credentials, telemetry, and host-level subagent providers — over the empty profile root, as the first layer of every profile's `dsh.profile.bundles` list. This bundle neither depends on nor mounts the optional Codex and Claude Code providers; an opting-in Profile installs and mounts the selected provider once on the host plane, while Agent Presets decide whether their agents receive the corresponding model-facing delegation tools. Later bundle layers (e.g. [`dsh-web-app`](../web-app/README.md)) and the user's profile `cordis.patch.yml` override these rows by id; a patch replaces a row's whole `config`, so mode-specific values live in mode bundles, not here. The package has no runtime API; the profile composer resolves the patch through the `dsh.bundle.patch` manifest field, never through code.
10
+ ## Summary
11
+
12
+ Every base-backed `dsh --profile` surface runs on `dsh-base`, so those surfaces share a model connection, the full tool set, durable session history, and workspace safety defaults. The shipped `sdk-minimal` profile deliberately uses a complete standalone tree instead. You rarely touch this bundle directly — shipped base-backed profiles already include it, and a custom base-backed profile names it first. When you need different defaults, change your profile patch or add a later bundle; this package is not a library you import.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Use this package](#use-this-package)
17
+ - [Understand the implementation](#understand-the-implementation)
18
+ - [Further Exploration](#further-exploration)
19
+ - [Model Experience](#model-experience)
20
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
21
+ - [Dev Note](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## Use this package
27
+
28
+ You get the dsh core automatically: the shipped `web`, `headless`, `sdk`, and `acp` profiles already include it, and a custom profile names it as its first bundle. After that, everything works with no further configuration.
29
+
30
+ ### A minimal custom profile
31
+
32
+ To build a profile on the shared core, create a profile with a `package.json` that names `@xneog/dsh-base` first:
33
+
34
+ ```json
35
+ {
36
+ "name": "my-profile",
37
+ "private": true,
38
+ "dsh": {
39
+ "profile": {
40
+ "bundles": ["@xneog/dsh-base"]
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ Run `dsh --profile my-profile "your task"` and you get a working agent with model access, tools, persistence, and the default permission policy. The shipped `web`, `headless`, `sdk`, and `acp` profiles are created for you on first use. To add more bundles, run `dsh plugin --profile <name> add <package>`; in-box bundles resolve from the dsh installation. The profile contract is documented in the [app-boot profile section](../../boot/app-boot/README.md).
47
+
48
+ ### What you get
49
+
50
+ Out of the box, every profile built on this core provides: a DeepSeek model connection (the provider and model are configurable, and you can enable extra providers from your settings), the full tool set — file editing, shell commands, web search, public HTTP(S) fetch, subagents, task and goal tracking — durable sessions that survive restarts, and the default permission policy that confines file writes to your workspace and asks before risky actions. Web fetch runs without per-call approval; its provider rejects non-public destinations. Telemetry stays off unless you opt in.
51
+
52
+ ### Shell tools per platform
53
+
54
+ On macOS and Linux you get the bash shell tools; on Windows you get the PowerShell twins instead, so exactly one shell stack is available per machine. The safety behavior is identical on every platform. A Windows host that prefers the unconfined PowerShell executor can switch the shell rows in its profile patch — the switch must disable both PowerShell rows and re-enable both bash rows, otherwise the profile fails to load.
55
+
56
+ ### Changing the defaults
57
+
58
+ To change what a profile built on this core provides — a different default model, a stricter permission mode, extra or fewer tools — edit your profile's `cordis.patch.yml` or add a later bundle. Each patch entry replaces the target's whole configuration, so restate every setting you want to keep. Keep the sandboxed filesystem provider as the single file-write path: adding the plain filesystem provider on top of it makes the profile fail to load.
59
+
60
+ -----
61
+
62
+ <a id="understand-the-implementation"></a>
63
+ ## Understand the implementation
64
+
65
+ <details>
66
+ <summary>Implementation internals — click to expand</summary>
6
67
 
7
- The patch gates both shell stacks by platform on its own rows: `bash-sandbox`/`tool-bash` carry `disabled: !!js process.platform === 'win32'` (bash has no Windows runner), and their twins `pwsh-sandbox`/`tool-pwsh` mount on win32 only with the inverted expression — one shared patch file, exactly one shell stack per host. The permission surface stays exactly as on POSIX: `sandbox`/`sandbox-policy` enforce the file-effect policy through the Windows ACL restricted-token runner (the win32 chain of `dsh-sandbox-local` → `@xneog/dsh-sandbox-windows-acl`), the permission switcher and the approval service run unchanged, and `fs-sandbox` keeps fencing `ctx.fs` writes mounting `dsh-fs-local` alongside it would double-register `ctx.fs` and fail the load. A Windows host that prefers the unconfined local pwsh executor or full access overrides these rows through its profile or home `cordis.patch.yml` (the bash-restore recipe must be complete: disable `pwsh-sandbox`/`tool-pwsh` AND re-enable `bash-sandbox`/`tool-bash` — both executor families register the same `bash` service, so an incomplete recipe fails loud at load). POSIX hosts see the pwsh rows disabled.
68
+ The bundle is a static patch document: one `insert` list applied over the empty profile root. It mounts no service, emits no events, and holds no mutable state; each inserted row's package owns that row's behavior and invariants.
8
69
 
9
- The row set and its rationale are documented inline in the patch file; the [generated composition graph](../../../apps/cli/composition.md) renders it.
70
+ ### Composition mechanics
10
71
 
72
+ A patch replaces the targeted row's whole `config` rather than merging into it. Later bundle layers and the user's profile `cordis.patch.yml` override rows by id, with the last write winning per row. Rows whose value differs by mode do not live here: each mode bundle restates its complete configuration, keeping any single row down to one bundle layer plus the user's. The full row set and its rationale are documented inline in [`cordis.patch.yml`](cordis.patch.yml); the [generated composition graph](../../../apps/cli/composition.md) renders it.
73
+
74
+ ### Platform gating
75
+
76
+ The patch gates the two shell stacks by platform on its own rows: `bash-sandbox` and `tool-bash` carry `disabled: !!js process.platform === 'win32'`, and their twins `pwsh-sandbox` and `tool-pwsh` mount on win32 only with the inverted expression. The permission surface stays identical to POSIX: the sandbox policy executes the same file-effect policy through the Windows ACL restricted-token runner (`dsh-sandbox-local` → `@xneog/dsh-sandbox-windows-acl`), and `fs-sandbox` keeps fencing `ctx.fs` writes — mounting `dsh-fs-local` alongside it would double-register `ctx.fs` and fail the load.
77
+
78
+ ### Source map
79
+
80
+ | File | Role |
81
+ |---|---|
82
+ | [`cordis.patch.yml`](cordis.patch.yml) | The bundle substance: the base plugin rows, with per-row rationale as inline comments |
83
+ | [`src/index.ts`](src/index.ts) | Package entry; carries no runtime API |
84
+ | — | No runtime invariant companion is published; the package is a static patch-list carrier (a YAML document of loader rows owned by other packages); it mounts no service, emits no events, and owns no mutable relation to check. Each inserted row's own package carries that row's invariants. |
85
+ | [`tests/base.spec.ts`](tests/base.spec.ts) | Manifest declaration and platform-gating checks |
86
+
87
+ ### Invariant ownership
88
+
89
+ No invariant companion is published because the package is a static patch-list carrier: each inserted row's package owns that row's invariants, and the bundle owns no mutable relation to check.
90
+
91
+ </details>
92
+
93
+ -----
94
+
95
+ <a id="further-exploration"></a>
96
+ ## Further Exploration
97
+
98
+ Read these pages when you want to go deeper into profiles, the surfaces built on this core, or the exact composition.
99
+
100
+ - [app-boot profile section](../../boot/app-boot/README.md) — how profiles are resolved, layered, and customized.
101
+ - [Bundle package map](../README.md) — the surfaces built on this core.
102
+ - [Generated composition graph](../../../apps/cli/composition.md) — the exact plugin set each shipped profile uses.
103
+ - [Profile plugin bundles note](../../../.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.md) — the profile and bundle composition design.
104
+ - [Codex and Claude Code provider bundles](../../subagent/README.md) — optional provider bundles you can install on top.
105
+
106
+ -----
107
+
108
+ <a id="model-experience"></a>
11
109
  ## Model Experience
12
110
 
13
- Indirectly, through the inserted rows: this bundle selects the shipped persona-less prompt base, tool set, and DeepSeek adapter that mode bundles specialize, and contributes no model-visible text of its own.
111
+ Indirectly, through each inserted row's package, which owns that row's model-facing behavior.
14
112
 
15
113
  #### KV Cache effect
16
114
 
17
- None directly; each inserted row's package owns its effect.
115
+ The bundle itself adds no request prefix; each inserted row's package owns any cache effect.
18
116
 
19
117
  ## Known Limitations and Deferred Work
20
118
 
21
- - **A patch replaces whole row configs** — profile overrides must restate every field a row keeps; there is no deep-merge layer.
22
- - **The Windows temp grant is a private per-session subdirectory** — `workspace-write` confines writes to the workspace plus the session's own temp subdirectory (`<temp>\dsh-<hash>`, TMP/TEMP rewritten for confined children); `read-only` grants nothing. See `@xneog/dsh-sandbox-windows-acl`.
119
+ <a id="known-limitations-and-deferred-work"></a>
120
+
121
+
122
+ These limits tell you when the core needs extra care or where an override must go. They are current package constraints, not a general comparison or a task backlog.
123
+
124
+ - **Overrides replace whole settings blocks** — a patch entry replaces the target's entire configuration, so your override must restate every setting you want to keep; nothing merges automatically.
125
+ - **Per-surface settings belong to the surface's bundle** — a default that differs between the web GUI and headless mode lives in that surface's bundle, not in the shared core.
126
+ - **Windows temp grants are private per-session subdirectories** — `workspace-write` confines writes to the workspace plus the session's own temp subdirectory (`<temp>\dsh-<hash>`, TMP/TEMP rewritten for confined children); `read-only` grants nothing. See `@xneog/dsh-sandbox-windows-acl`.
127
+ - **Adding the plain filesystem provider on top of the sandboxed one fails the profile** — the two register the same service, so the profile refuses to load; use one or the other.
128
+
129
+ <a id="dev-note"></a>
130
+ ### Dev Note
131
+
132
+ <details>
133
+ <summary>Working context for maintainers — click to expand</summary>
134
+
135
+ None.
136
+
137
+ </details>
package/README.zh.md CHANGED
@@ -1,22 +1,137 @@
1
- # `@xneog/dsh-base`
1
+ ---
2
+ description: "共享的 dsh 核心:为每个 dsh --profile 表层提供模型访问、工具、持久会话与安全默认值,供用户组合或定制 profile。"
3
+ kind: "package-bundle"
4
+ ---
5
+
6
+ # @xneog/dsh-base
2
7
 
3
8
  [English](README.md) | 中文
4
9
 
5
- profile 组合包形式交付的共享 dsh 核心:[`cordis.patch.yml`](cordis.patch.yml) 在空的 profile 根之上插入全部基础插件行——模型适配器、共享的 [`agent-default-model`](../../core/agent-default-model/README.md) 选择、工具、持久化、策略、settings/credentials、遥测与宿主级 subagent provider——作为每个 profile 的 `dsh.profile.bundles` 列表中的第一层。这个 bundle 既不依赖也不挂载可选的 Codex 与 Claude Code provider;选择产品集成的 Profile 会安装目标 provider 并在 host plane(宿主平面)挂载一次,Agent Preset 则决定自己的 agent 是否获得对应的面向模型委派工具。后续的组合包层(例如 [`dsh-web-app`](../web-app/README.md))和用户 profile 的 `cordis.patch.yml` 按 id 覆盖这些行;patch 会替换目标行的整个 `config`,因此模式专属的值放在各模式组合包中,而不是这里。该包没有运行时 API;profile 组合器通过 manifest(元数据清单)的 `dsh.bundle.patch` 字段解析 patch,绝不通过代码。
10
+ ## 概述
11
+
12
+ 每个基于 base 的 `dsh --profile` 表层都运行在 `dsh-base` 上,因此这些表层共享模型连接、完整工具集、持久会话历史和 workspace 安全默认值。随附的 `sdk-minimal` profile 刻意改用完整的独立配置树。你通常不直接操作本 bundle——随附的 base-backed profile 已经包含它,自定义 base-backed profile 则把它放在第一位。需要其他默认值时,应修改自己的 profile patch 或添加后续 bundle;本包不是供导入的库。
13
+
14
+ ## 目录
15
+
16
+ - [使用本包](#use-this-package)
17
+ - [理解实现](#understand-the-implementation)
18
+ - [进一步探索](#further-exploration)
19
+ - [模型体验](#model-experience)
20
+ - [已知限制与延期工作](#known-limitations-and-deferred-work)
21
+ - [开发备注](#dev-note)
22
+
23
+ -----
24
+
25
+ <a id="use-this-package"></a>
26
+ ## 使用本包
27
+
28
+ 你会自动获得 dsh 核心:随发行版交付的 `web`、`headless`、`sdk` 与 `acp` profile 已包含它,自定义 profile 则把它列为第一个组合包。之后一切无需任何额外配置即可工作。
29
+
30
+ ### 最小自定义 profile
31
+
32
+ 要在共享核心之上构建 profile,请创建一个 profile,其 `package.json` 把 `@xneog/dsh-base` 列在首位:
33
+
34
+ ```json
35
+ {
36
+ "name": "my-profile",
37
+ "private": true,
38
+ "dsh": {
39
+ "profile": {
40
+ "bundles": ["@xneog/dsh-base"]
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ 运行 `dsh --profile my-profile "your task"`,你就得到一个可用的 agent(智能体),带模型访问、工具、持久化与默认权限策略。随发行版交付的 `web`、`headless`、`sdk` 与 `acp` profile 会在首次使用时为你创建。要添加更多组合包,运行 `dsh plugin --profile <name> add <package>`;内置组合包从 dsh 安装目录解析。profile 约定见 [app-boot 的 profile 章节](../../boot/app-boot/README.zh.md)。
47
+
48
+ ### 你得到什么
49
+
50
+ 开箱即用,基于本核心构建的每个 profile 都提供:DeepSeek 模型连接(provider 与模型可配置,你还可以在设置中启用额外 provider)、完整工具集——文件编辑、shell 命令、web 搜索、公开 HTTP(S) 抓取、subagent、任务与目标跟踪——可跨重启存活的持久会话,以及默认权限策略:把文件写入限制在工作区内,危险操作前征询许可。Web 抓取无需逐次审批,其提供方会拒绝非公开目的地址。遥测默认关闭,除非你主动开启。
51
+
52
+ ### 各平台的 shell 工具
53
+
54
+ 在 macOS 与 Linux 上你获得 bash shell 工具;在 Windows 上则获得对应的 PowerShell 孪生工具,因此每台机器恰好有一套 shell 栈。各平台的安全行为完全一致。偏好不受沙盒约束的 PowerShell 执行器的 Windows 主机可以在其 profile patch 中切换 shell 行——切换必须同时禁用两个 PowerShell 行并重新启用两个 bash 行,否则 profile 无法加载。
55
+
56
+ ### 更改默认值
57
+
58
+ 要改变基于本核心构建的 profile 提供的内容——不同的默认模型、更严格的权限模式、更多或更少的工具——请编辑 profile 的 `cordis.patch.yml` 或添加后面的组合包。每个 patch 条目会替换目标的整个配置,因此请重述每个想保留的设置。保持沙箱化文件系统提供方作为唯一的文件写入路径:在其之上再添加普通文件系统提供方会导致 profile 加载失败。
59
+
60
+ -----
61
+
62
+ <a id="understand-the-implementation"></a>
63
+ ## 理解实现
64
+
65
+ <details>
66
+ <summary>实现细节——点击展开</summary>
6
67
 
7
- patch 在自身上按平台门控两个 shell 栈:`bash-sandbox`/`tool-bash` 携带 `disabled: !!js process.platform === 'win32'`(bash 没有 Windows runner),它们的孪生行 `pwsh-sandbox`/`tool-pwsh` 以取反的表达式仅在 win32 挂载——同一份 patch 文件,每个宿主恰好挂载一个 shell 栈。权限面与 POSIX 完全一致:`sandbox`/`sandbox-policy` 通过 Windows ACL 受限令牌 runner(`dsh-sandbox-local` 的 win32 链 → `@xneog/dsh-sandbox-windows-acl`)执行文件效果策略,权限切换器与 approval 服务原样运行,`fs-sandbox` 继续围栏 `ctx.fs` 写入——在其旁再挂载 `dsh-fs-local` 会重复注册 `ctx.fs` 并在加载时失败。偏好不受沙盒约束的本地 pwsh 执行器或完整访问的 Windows 主机通过其 profile home 的 `cordis.patch.yml` 覆盖这些行(bash 恢复配方必须完整:禁用 `pwsh-sandbox`/`tool-pwsh` 并重新启用 `bash-sandbox`/`tool-bash`——两个执行器家族注册同一个 `bash` 服务,配方不完整会在加载时直接报错)。POSIX 主机看到的是被禁用的 pwsh 行。
68
+ 本组合包是一份静态 patch 文档:一个应用到空 profile 根之上的 `insert` 列表。它不挂载任何服务、不发出任何事件、也不持有任何可变状态;每条插入行所属的包负责该行的行为与不变式。
8
69
 
9
- 行集合及其设计依据以行内注释写在 patch 文件里;[生成的组合图](../../../apps/cli/composition.md)负责渲染它。
70
+ ### 组合机制
10
71
 
72
+ patch 会替换目标行的整个 `config`,而不是合并进它。后续组合包层与用户的 profile `cordis.patch.yml` 按 id 覆盖行,每行最后一次写入生效。按模式取值不同的行不属于这里:每个模式组合包重述自己的完整配置,让任何单一行最多只属于一个组合包层加用户层。完整行集合及其设计依据以行内注释写在 [`cordis.patch.yml`](cordis.patch.yml) 里;[生成的组合图](../../../apps/cli/composition.md)负责渲染它。
73
+
74
+ ### 平台门控
75
+
76
+ patch 在自身上按平台门控两个 shell 栈:`bash-sandbox` 与 `tool-bash` 携带 `disabled: !!js process.platform === 'win32'`,孪生行 `pwsh-sandbox` 与 `tool-pwsh` 以取反的表达式仅在 win32 挂载。权限面与 POSIX 完全一致:沙箱策略通过 Windows ACL 受限令牌 runner(`dsh-sandbox-local` → `@xneog/dsh-sandbox-windows-acl`)执行相同的文件效果策略,`fs-sandbox` 继续围栏 `ctx.fs` 写入——在其旁再挂载 `dsh-fs-local` 会重复注册 `ctx.fs` 并在加载时失败。
77
+
78
+ ### 源码地图
79
+
80
+ | 文件 | 职责 |
81
+ |---|---|
82
+ | [`cordis.patch.yml`](cordis.patch.yml) | 组合包的实体:基础插件行,附以行内注释说明各行依据 |
83
+ | [`src/index.ts`](src/index.ts) | 包入口;不携带任何运行时 API |
84
+ | — | 不发布运行时不变式伴生入口;本包只持有静态 patch 列表,插入的各行分别负责自己的不变式。 |
85
+ | [`tests/base.spec.ts`](tests/base.spec.ts) | manifest 声明与平台门控检查 |
86
+
87
+ ### 不变式归属
88
+
89
+ 不发布不变式伴生入口,因为本包是静态 patch 列表载体:每条插入行由所属的包负责其不变式,组合包自身没有任何可审计的可变关系。
90
+
91
+ </details>
92
+
93
+ -----
94
+
95
+ <a id="further-exploration"></a>
96
+ ## 进一步探索
97
+
98
+ 当你想深入了解 profile、基于本核心构建的表层或确切组合时,阅读以下页面。
99
+
100
+ - [app-boot 的 profile 章节](../../boot/app-boot/README.zh.md)——profile 如何解析、分层与定制。
101
+ - [组合包包映射](../README.zh.md)——基于本核心构建的表层。
102
+ - [生成组合图](../../../apps/cli/composition.md)——每个已发布 profile 使用的确切插件集合。
103
+ - [Profile 组合包设计笔记](../../../.agents/notes/implemented/architecture/2026-08-05-profile-plugin-bundles.zh.md)——profile 与组合包的组合设计。
104
+ - [Codex 与 Claude Code provider 组合包](../../subagent/README.zh.md)——可叠加安装的可选 provider 组合包。
105
+
106
+ -----
107
+
108
+ <a id="model-experience"></a>
11
109
  ## 模型体验
12
110
 
13
- 通过插入的行间接产生影响:该组合包选定了随发行版交付的无 persona 提示词基座、工具集合与 DeepSeek 适配器,供各模式组合包进一步特化;它自身不贡献任何模型可见文本。
111
+ 通过每条插入行所属的包间接产生影响,由各包负责其行的模型可见行为。
14
112
 
15
113
  #### KV Cache 影响
16
114
 
17
- 无直接影响;每条插入行的影响由其所属的包负责。
115
+ 组合包本身不添加任何请求前缀;每条插入行所属的包负责各自的缓存影响。
116
+
117
+ ## 已知限制与延期工作
118
+
119
+ <a id="known-limitations-and-deferred-work"></a>
18
120
 
19
- ## 已知限制与暂缓事项
20
121
 
21
- - **patch 会替换整行 `config`**:profile 覆盖必须重述该行需要保留的每个字段;不存在深度合并层。
122
+ 这些限制告诉你核心何时需要额外注意、覆盖应放在哪里。它们是当前包约束,不是通用对比或任务积压。
123
+
124
+ - **覆盖会替换整个设置块**——patch 条目会替换目标的整个配置,因此你的覆盖必须重述每个想保留的设置;不会自动合并。
125
+ - **按表层的设置属于该表层的组合包**——web GUI 与 headless 模式取值不同的默认值放在对应表层的组合包里,而不是共享核心。
22
126
  - **Windows 的临时目录授权是按会话的私有子目录**——`workspace-write` 把写入限制在工作区与会话自己的 temp 子目录(`<temp>\dsh-<hash>`,受限子进程的 TMP/TEMP 被改写);`read-only` 不授予任何临时目录写入权限。见 `@xneog/dsh-sandbox-windows-acl`。
127
+ - **在沙箱化文件系统提供方之上添加普通提供方会导致 profile 失败**——两者注册同一个服务,profile 因此拒绝加载;二选一。
128
+
129
+ <a id="dev-note"></a>
130
+ ### 开发备注
131
+
132
+ <details>
133
+ <summary>维护者的工作上下文——点击展开</summary>
134
+
135
+ 无。
136
+
137
+ </details>
package/cordis.patch.yml CHANGED
@@ -1,4 +1,4 @@
1
- # The dsh-base bundle patch: the shared core of every dsh profile, applied as
1
+ # The dsh-base bundle patch: the shared core of each base-backed profile, applied as
2
2
  # ONE insert over the empty profile root. Later bundle patches and the user's
3
3
  # profile cordis.patch.yml address these rows by id, with the last write
4
4
  # winning per row.
@@ -16,17 +16,26 @@
16
16
  - id: timer
17
17
  name: '@xneog/cordis-plugin-timer'
18
18
 
19
+ # Module reload is opt-in per profile. `patchReload: live` config watching
20
+ # uses the launcher's watch-only fallback and does not require this row.
19
21
  - id: hmr
20
22
  name: '@xneog/cordis-plugin-hmr'
23
+ disabled: true
21
24
  config:
22
25
  root: ['.']
23
26
 
24
27
  - id: llm
25
28
  name: '@xneog/dsh-llm'
26
29
 
30
+ - id: deepseek-llm-api-extensions
31
+ name: '@xneog/dsh-deepseek-llm-api-extensions'
32
+
27
33
  - id: session
28
34
  name: '@xneog/dsh-session'
29
35
 
36
+ - id: session-log-deepseek
37
+ name: '@xneog/dsh-session-log-deepseek'
38
+
30
39
  - id: typert
31
40
  name: '@xneog/dsh-typert-registry'
32
41
 
@@ -58,6 +67,9 @@
58
67
  - id: agent
59
68
  name: '@xneog/dsh-agent'
60
69
 
70
+ - id: plugin-package-inventory-deepseek
71
+ name: '@xneog/dsh-plugin-package-inventory-deepseek'
72
+
61
73
  # The transport-independent default for Agents created by entry points.
62
74
  # Settings may supply a saved selection; consumers read it at creation time.
63
75
  - id: agent-default-model
@@ -126,11 +138,41 @@
126
138
  - id: session-projection
127
139
  name: '@xneog/dsh-session-projection'
128
140
 
129
- # Session telemetry is mounted but disabled by default. DSH_TELEMETRY_MODE
130
- # explicitly opts into FULL or FEEDBACK_ONLY reporting; uploading mirrors
131
- # session-log records onto OTLP/HTTP logs with no session-telemetry/record redaction
132
- # rule, so exports are the raw captured copy. The deployment stance, env
133
- # seams, and follow-ups are pinned in the default-off Agent Note.
141
+ # Durable KV storage: the storage hub, the json backend, and the
142
+ # schema-validated domain form over them. Session-layer persistence (the
143
+ # projection cache below; workspace and message-feedback in web layers)
144
+ # routes through this stack, so it belongs to the shared base.
145
+ - id: storage
146
+ name: '@xneog/dsh-storage'
147
+
148
+ - id: storage-json
149
+ name: '@xneog/dsh-storage-json'
150
+ config:
151
+ root: !!js dshHomePath('storages')
152
+
153
+ - id: storage-domain
154
+ name: '@xneog/dsh-storage-domain'
155
+ config:
156
+ backend: json
157
+
158
+ # Persisted projection cache: throttled write-behind over the
159
+ # session_projcache domain (per-record layout — one version-stamped
160
+ # checkpoint document per session), serving the session listing's
161
+ # projection column.
162
+ - id: session-projection-cache
163
+ name: '@xneog/dsh-session-projection-cache'
164
+ config:
165
+ writeEveryEvents: 200
166
+ writeIntervalMs: 5000
167
+
168
+ # Session telemetry defaults to feedback-gated sharing: FEEDBACK_ONLY
169
+ # uploads only when the user records /feedback, releasing the session
170
+ # records since the last handoff through that event (a resumed session
171
+ # shares only its current lifecycle). DSH_TELEMETRY_MODE overrides to
172
+ # FULL or DISABLED; uploading mirrors session-log records onto OTLP/HTTP
173
+ # logs with no session-telemetry/record redaction rule, so exports are
174
+ # the raw captured copy. The deployment stance, env seams, and follow-ups
175
+ # are pinned in the feedback-gated-default Agent Note.
134
176
  # DSH_TELEMETRY_OTLP_URL overrides the production endpoint. A non-empty
135
177
  # DSH_TELEMETRY_DISABLED — any value, including '0'/'false' — opts the
136
178
  # process out (the launchers patch the row disabled; config cannot disable
@@ -148,7 +190,7 @@
148
190
  - id: session-telemetry-otel
149
191
  name: '@xneog/dsh-session-telemetry-otel'
150
192
  config:
151
- mode: !!js process.env.DSH_TELEMETRY_MODE || 'DISABLED'
193
+ mode: !!js process.env.DSH_TELEMETRY_MODE || 'FEEDBACK_ONLY'
152
194
  shutdownTimeoutMillis: 3000
153
195
  exporter:
154
196
  url: !!js process.env.DSH_TELEMETRY_OTLP_URL ?? 'https://harness-telemetry.deepseeksvc.com/v1/logs'
@@ -317,10 +359,12 @@
317
359
  toolName: subagent
318
360
  backgroundMode: continuable
319
361
 
320
- # Fork stays one-shot: a continuable child's `report` tool and prompt
321
- # section precede the inherited history a fork exists to reuse; one-shot
322
- # fork children install neither, keeping the parent's request prefix.
323
- # See .agents/notes/implemented/architecture/2026-08-10-fork-children-stay-one-shot.md.
362
+ # Fork omits model selection so provider/model stay equal to the parent and
363
+ # the inherited history remains eligible for KV Cache reuse. This base row
364
+ # stays one-shot; preset layers may select continuable mode without adding a
365
+ # child-only system-prompt section or tool schema ahead of that history.
366
+ # See .agents/notes/implemented/feature/2026-08-18-model-selected-subagent-routes.md
367
+ # and .agents/notes/implemented/architecture/2026-08-10-fork-children-stay-one-shot.md.
324
368
  - id: tool-subagent-fork
325
369
  name: '@xneog/dsh-tool-subagent'
326
370
  config:
@@ -328,10 +372,6 @@
328
372
  toolName: subagent_fork
329
373
  backgroundMode: one-shot
330
374
 
331
- # Optional direct-child return channel; absent from roots and one-shot agents.
332
- - id: tool-subagent-report
333
- name: '@xneog/dsh-tool-subagent-report'
334
-
335
375
  - id: workflow-worker-thread
336
376
  name: '@xneog/dsh-workflow-worker-thread'
337
377
  config:
@@ -393,28 +433,35 @@
393
433
  thresholds: [3, 5, 8]
394
434
  argumentsPreviewChars: 500
395
435
 
396
- # Every mode enables the stable model-facing web_search tool. DeepSeek search
397
- # resolves the same DEEPSEEK_API_KEY credential the Models page manages for
398
- # chat, at each search; its Messages endpoint is separate from the
399
- # chat-completions endpoint, so it takes its own base-URL override. Fetch stays
400
- # disabled and no fetch provider is mounted: that provider defers SSRF
401
- # protection and the model would choose the request target. Search is a full
402
- # auxiliary model request with server-side retrieval, so this shipped DeepSeek
403
- # route gets 60s while the provider-neutral tool default remains 30s.
436
+ # The shared base enables the stable model-facing web_search and web_fetch
437
+ # tools. The Web app disables this host row and composes both tools per agent
438
+ # preset; products with a stricter network policy override tool-web. DeepSeek
439
+ # search resolves the same DEEPSEEK_API_KEY
440
+ # credential the Models page manages for chat, at each search; its Messages
441
+ # endpoint is separate from the chat-completions endpoint, so it takes its own
442
+ # base-URL override. Anonymous fetch accepts only public HTTP(S) destinations,
443
+ # resolves and validates every destination, and pins every actual connection.
444
+ # Search is a full auxiliary model request with server-side retrieval, so this
445
+ # shipped DeepSeek route gets 60s while the provider-neutral tool default
446
+ # remains 30s.
404
447
  - id: web
405
448
  name: '@xneog/dsh-web'
406
449
  config:
407
450
  searchProvider: deepseek-official
451
+ fetchProvider: http
408
452
 
409
453
  - id: web-search-deepseek
410
454
  name: '@xneog/dsh-web-search-deepseek'
411
455
  config:
412
456
  apiKeyEnv: DEEPSEEK_API_KEY
413
457
 
458
+ - id: web-fetch-http
459
+ name: '@xneog/dsh-web-fetch-http'
460
+
414
461
  - id: tool-web
415
462
  name: '@xneog/dsh-tool-web'
416
463
  config:
417
- fetch: false
464
+ fetch: true
418
465
  searchTimeoutMs: 60000
419
466
 
420
467
  # ── rows every mode mounts, whose values each overlay may state ──────────────
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@xneog/dsh-base",
3
- "description": "The shared dsh core as a profile bundle: every profile's first patch layer, inserting the base plugin rows over the empty profile root",
4
- "version": "0.1.0",
3
+ "description": "The shared dsh core as a profile bundle: the first patch layer of base-backed profiles, inserting core rows over the empty profile root",
4
+ "version": "0.1.3-alpha.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -18,17 +18,12 @@
18
18
  "types": "./lib/types/index.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
- "./invariant": {
22
- "types": "./lib/types/invariant.d.ts",
23
- "default": "./lib/invariant.js"
24
- },
25
21
  "./cordis.patch.yml": "./cordis.patch.yml",
26
22
  "./src/*": "./src/*",
27
23
  "./package.json": "./package.json"
28
24
  },
29
25
  "files": [
30
26
  "lib/index.js",
31
- "lib/invariant.js",
32
27
  "cordis.patch.yml",
33
28
  "lib/types/**/*.d.ts"
34
29
  ],
@@ -39,90 +34,95 @@
39
34
  }
40
35
  },
41
36
  "dependencies": {
42
- "@xneog/cordis-plugin-hmr": "0.1.0",
43
- "@xneog/cordis-plugin-timer": "0.1.0",
44
- "@xneog/dsh-agent": "0.1.0",
45
- "@xneog/dsh-agent-default-model": "0.1.0",
46
- "@xneog/dsh-agent-loop": "0.1.0",
47
- "@xneog/dsh-attachment-local": "0.1.0",
48
- "@xneog/dsh-shell-env": "0.1.0",
49
- "@xneog/dsh-bash-sandbox": "0.1.0",
50
- "@xneog/dsh-command-compact": "0.1.0",
51
- "@xneog/dsh-command-feedback": "0.1.0",
52
- "@xneog/dsh-command-goal": "0.1.0",
53
- "@xneog/dsh-commands": "0.1.0",
54
- "@xneog/dsh-compaction-basic": "0.1.0",
55
- "@xneog/dsh-compaction-tool-result-pruner": "0.1.0",
56
- "@xneog/dsh-credentials-local": "0.1.0",
57
- "@xneog/dsh-fs-local": "0.1.0",
58
- "@xneog/dsh-fs-observation-policy": "0.1.0",
59
- "@xneog/dsh-fs-sandbox": "0.1.0",
60
- "@xneog/dsh-goal": "0.1.0",
61
- "@xneog/dsh-goal-round-driver": "0.1.0",
62
- "@xneog/dsh-api-gateway": "0.1.0",
63
- "@xneog/dsh-llm": "0.1.0",
64
- "@xneog/dsh-llm-deepseek": "0.1.0",
65
- "@xneog/dsh-llm-pi-ai": "0.1.0",
66
- "@xneog/dsh-llm-retry": "0.1.0",
67
- "@xneog/dsh-permission-presets": "0.1.0",
68
- "@xneog/dsh-plan-mode": "0.1.0",
69
- "@xneog/dsh-pwsh-sandbox": "0.1.0",
70
- "@xneog/dsh-repeat-tool-reminder": "0.1.0",
71
- "@xneog/dsh-sandbox-local": "0.1.0",
72
- "@xneog/dsh-sandbox-policy": "0.1.0",
73
- "@xneog/dsh-session": "0.1.0",
74
- "@xneog/dsh-session-checkpoint-policy": "0.1.0",
75
- "@xneog/dsh-session-persistence-jsonl": "0.1.0",
76
- "@xneog/dsh-session-projection": "0.1.0",
77
- "@xneog/dsh-session-query-sqlite": "0.1.0",
78
- "@xneog/dsh-session-telemetry-otel": "0.1.0",
79
- "@xneog/dsh-session-title": "0.1.0",
80
- "@xneog/dsh-session-title-first-prompt-llm": "0.1.0",
81
- "@xneog/dsh-settings-file": "0.1.0",
82
- "@xneog/dsh-skill": "0.1.0",
83
- "@xneog/dsh-skill-badge": "0.1.0",
84
- "@xneog/dsh-skill-filesystem": "0.1.0",
85
- "@xneog/dsh-spill-local": "0.1.0",
86
- "@xneog/dsh-spill-policy": "0.1.0",
87
- "@xneog/dsh-subagent": "0.1.0",
88
- "@xneog/dsh-subagent-fork-in-process": "0.1.0",
89
- "@xneog/dsh-subagent-spawn-in-process": "0.1.0",
90
- "@xneog/dsh-subprocess-local": "0.1.0",
91
- "@xneog/dsh-system-prompt": "0.1.0",
92
- "@xneog/dsh-jobs-local": "0.1.0",
93
- "@xneog/dsh-tool-call-timeout-policy": "0.1.0",
94
- "@xneog/dsh-token-meter": "0.1.0",
95
- "@xneog/dsh-tool-bash": "0.1.0",
96
- "@xneog/dsh-tool-fs": "0.1.0",
97
- "@xneog/dsh-tool-fs-search": "0.1.0",
98
- "@xneog/dsh-tool-goal": "0.1.0",
99
- "@xneog/dsh-tool-pwsh": "0.1.0",
100
- "@xneog/dsh-tool-ralph": "0.1.0",
101
- "@xneog/dsh-tool-skill": "0.1.0",
102
- "@xneog/dsh-tool-str-replace-editor": "0.1.0",
103
- "@xneog/dsh-tool-subagent": "0.1.0",
104
- "@xneog/dsh-tool-subagent-control": "0.1.0",
105
- "@xneog/dsh-tool-subagent-report": "0.1.0",
106
- "@xneog/dsh-tool-jobs": "0.1.0",
107
- "@xneog/dsh-tool-todo": "0.1.0",
108
- "@xneog/dsh-tool-web": "0.1.0",
109
- "@xneog/dsh-tool-workflow": "0.1.0",
110
- "@xneog/dsh-tools": "0.1.0",
111
- "@xneog/dsh-typert-loader": "0.1.0",
112
- "@xneog/dsh-typert-registry": "0.1.0",
113
- "@xneog/dsh-user-approval": "0.1.0",
114
- "@xneog/dsh-user-questions": "0.1.0",
115
- "@xneog/dsh-web": "0.1.0",
116
- "@xneog/dsh-web-search-deepseek": "0.1.0",
117
- "@xneog/dsh-workflow-worker-thread": "0.1.0",
118
- "@xneog/dsh-agent-instructions": "0.1.0"
37
+ "@xneog/cordis-plugin-timer": "^1.1.4",
38
+ "@xneog/dsh-agent": "^0.1.3-alpha.1",
39
+ "@xneog/dsh-agent-loop": "^0.1.3-alpha.1",
40
+ "@xneog/dsh-agent-default-model": "^0.1.3-alpha.1",
41
+ "@xneog/dsh-shell-env": "^0.1.3-alpha.1",
42
+ "@xneog/dsh-bash-sandbox": "^0.1.3-alpha.1",
43
+ "@xneog/dsh-command-compact": "^0.1.3-alpha.1",
44
+ "@xneog/dsh-compaction-basic": "^0.1.3-alpha.1",
45
+ "@xneog/dsh-command-goal": "^0.1.3-alpha.1",
46
+ "@xneog/dsh-commands": "^0.1.3-alpha.1",
47
+ "@xneog/dsh-deepseek-llm-api-extensions": "^0.1.3-alpha.1",
48
+ "@xneog/cordis-plugin-hmr": "^1.0.17",
49
+ "@xneog/dsh-command-feedback": "^0.1.3-alpha.1",
50
+ "@xneog/dsh-credentials-local": "^0.1.3-alpha.1",
51
+ "@xneog/dsh-fs-local": "^0.1.3-alpha.1",
52
+ "@xneog/dsh-fs-observation-policy": "^0.1.3-alpha.1",
53
+ "@xneog/dsh-compaction-tool-result-pruner": "^0.1.3-alpha.1",
54
+ "@xneog/dsh-plugin-package-inventory-deepseek": "^0.1.3-alpha.1",
55
+ "@xneog/dsh-llm": "^0.1.3-alpha.1",
56
+ "@xneog/dsh-api-gateway": "^0.1.3-alpha.1",
57
+ "@xneog/dsh-goal-round-driver": "^0.1.3-alpha.1",
58
+ "@xneog/dsh-goal": "^0.1.3-alpha.1",
59
+ "@xneog/dsh-llm-pi-ai": "^0.1.3-alpha.1",
60
+ "@xneog/dsh-permission-presets": "^0.1.3-alpha.1",
61
+ "@xneog/dsh-llm-retry": "^0.1.3-alpha.1",
62
+ "@xneog/dsh-plan-mode": "^0.1.3-alpha.1",
63
+ "@xneog/dsh-fs-sandbox": "^0.1.3-alpha.1",
64
+ "@xneog/dsh-pwsh-sandbox": "^0.1.3-alpha.1",
65
+ "@xneog/dsh-llm-deepseek": "^0.1.3-alpha.1",
66
+ "@xneog/dsh-attachment-local": "^0.1.3-alpha.1",
67
+ "@xneog/dsh-repeat-tool-reminder": "^0.1.3-alpha.1",
68
+ "@xneog/dsh-session": "^0.1.3-alpha.1",
69
+ "@xneog/dsh-session-checkpoint-policy": "^0.1.3-alpha.1",
70
+ "@xneog/dsh-sandbox-policy": "^0.1.3-alpha.1",
71
+ "@xneog/dsh-sandbox-local": "^0.1.3-alpha.1",
72
+ "@xneog/dsh-session-persistence-jsonl": "^0.1.3-alpha.1",
73
+ "@xneog/dsh-session-query-sqlite": "^0.1.3-alpha.1",
74
+ "@xneog/dsh-session-title": "^0.1.3-alpha.1",
75
+ "@xneog/dsh-session-telemetry-otel": "^0.1.3-alpha.1",
76
+ "@xneog/dsh-settings-file": "^0.1.3-alpha.1",
77
+ "@xneog/dsh-session-log-deepseek": "^0.1.3-alpha.1",
78
+ "@xneog/dsh-session-title-first-prompt-llm": "^0.1.3-alpha.1",
79
+ "@xneog/dsh-skill-filesystem": "^0.1.3-alpha.1",
80
+ "@xneog/dsh-skill": "^0.1.3-alpha.1",
81
+ "@xneog/dsh-skill-badge": "^0.1.3-alpha.1",
82
+ "@xneog/dsh-session-projection-cache": "^0.1.3-alpha.1",
83
+ "@xneog/dsh-spill-policy": "^0.1.3-alpha.1",
84
+ "@xneog/dsh-storage": "^0.1.3-alpha.1",
85
+ "@xneog/dsh-subagent": "^0.1.3-alpha.1",
86
+ "@xneog/dsh-subagent-fork-in-process": "^0.1.3-alpha.1",
87
+ "@xneog/dsh-subagent-spawn-in-process": "^0.1.3-alpha.1",
88
+ "@xneog/dsh-system-prompt": "^0.1.3-alpha.1",
89
+ "@xneog/dsh-storage-domain": "^0.1.3-alpha.1",
90
+ "@xneog/dsh-jobs-local": "^0.1.3-alpha.1",
91
+ "@xneog/dsh-subprocess-local": "^0.1.3-alpha.1",
92
+ "@xneog/dsh-storage-json": "^0.1.3-alpha.1",
93
+ "@xneog/dsh-tool-call-timeout-policy": "^0.1.3-alpha.1",
94
+ "@xneog/dsh-tool-bash": "^0.1.3-alpha.1",
95
+ "@xneog/dsh-token-meter": "^0.1.3-alpha.1",
96
+ "@xneog/dsh-spill-local": "^0.1.3-alpha.1",
97
+ "@xneog/dsh-session-projection": "^0.1.3-alpha.1",
98
+ "@xneog/dsh-tool-fs-search": "^0.1.3-alpha.1",
99
+ "@xneog/dsh-tool-ralph": "^0.1.3-alpha.1",
100
+ "@xneog/dsh-tool-skill": "^0.1.3-alpha.1",
101
+ "@xneog/dsh-tool-str-replace-editor": "^0.1.3-alpha.1",
102
+ "@xneog/dsh-tool-subagent": "^0.1.3-alpha.1",
103
+ "@xneog/dsh-tool-subagent-control": "^0.1.3-alpha.1",
104
+ "@xneog/dsh-tool-fs": "^0.1.3-alpha.1",
105
+ "@xneog/dsh-tool-jobs": "^0.1.3-alpha.1",
106
+ "@xneog/dsh-tool-pwsh": "^0.1.3-alpha.1",
107
+ "@xneog/dsh-tool-goal": "^0.1.3-alpha.1",
108
+ "@xneog/dsh-tool-workflow": "^0.1.3-alpha.1",
109
+ "@xneog/dsh-tool-todo": "^0.1.3-alpha.1",
110
+ "@xneog/dsh-tool-web": "^0.1.3-alpha.1",
111
+ "@xneog/dsh-user-approval": "^0.1.3-alpha.1",
112
+ "@xneog/dsh-web": "^0.1.3-alpha.1",
113
+ "@xneog/dsh-typert-loader": "^0.1.3-alpha.1",
114
+ "@xneog/dsh-user-questions": "^0.1.3-alpha.1",
115
+ "@xneog/dsh-tools": "^0.1.3-alpha.1",
116
+ "@xneog/dsh-web-search-deepseek": "^0.1.3-alpha.1",
117
+ "@xneog/dsh-web-fetch-http": "^0.1.3-alpha.1",
118
+ "@xneog/dsh-workflow-worker-thread": "^0.1.3-alpha.1",
119
+ "@xneog/dsh-agent-instructions": "^0.1.3-alpha.1",
120
+ "@xneog/dsh-typert-registry": "^0.1.3-alpha.1"
119
121
  },
120
122
  "peerDependencies": {
121
- "@xneog/dsh-invariants": "0.1.0",
122
- "@xneog/cordis": "0.1.0"
123
+ "@xneog/cordis": "^4.0.2"
123
124
  },
124
125
  "devDependencies": {
125
- "@xneog/dsh-invariants": "0.1.0",
126
- "@xneog/cordis": "0.1.0"
126
+ "@xneog/cordis": "^4.0.2"
127
127
  }
128
128
  }
package/lib/invariant.js DELETED
@@ -1,19 +0,0 @@
1
- //#region lib/types/invariant.js
2
- /**
3
- * Package-owned invariant companion for `@xneog/dsh-base`.
4
- * @module @xneog/dsh-base/invariant
5
- */
6
- const PACKAGE_NAME = "@xneog/dsh-base";
7
- /** Cordis companion plugin name. */
8
- const name = "base-bundle-invariant";
9
- /** Service required before the companion can register. */
10
- const inject = ["invariants"];
11
- const install = () => {};
12
- /**
13
- * Register this package's invariant companion.
14
- * @param ctx - Cordis context carrying the invariant service.
15
- * @returns the installed registration's disposer after setup succeeds.
16
- */
17
- const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
18
- //#endregion
19
- export { apply, inject, name };
@@ -1,16 +0,0 @@
1
- /**
2
- * Package-owned invariant companion for `@xneog/dsh-base`.
3
- * @module @xneog/dsh-base/invariant
4
- */
5
- import type { Context } from '@xneog/cordis';
6
- /** Cordis companion plugin name. */
7
- export declare const name = "base-bundle-invariant";
8
- /** Service required before the companion can register. */
9
- export declare const inject: string[];
10
- /**
11
- * Register this package's invariant companion.
12
- * @param ctx - Cordis context carrying the invariant service.
13
- * @returns the installed registration's disposer after setup succeeds.
14
- */
15
- export declare const apply: (ctx: Context) => Promise<() => void>;
16
- //# sourceMappingURL=invariant.d.ts.map