@dsh-cc/plugin-loader 0.9.5 → 0.9.6-rc.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 check:readme --write
5
- README.md: 0289bc093d8733a200816afdcd2b47d2d43d5c01
6
- README.zh.md: 8fb15b4661770d4e65c39f819493bc961f84f62a
5
+ README.md: 96d0e50fbd0dd5785856229652c8b00f7a5439cb
6
+ README.zh.md: 9835da321e632f15cd2bf2ca03d4f98945d3ca45
package/README.md CHANGED
@@ -49,7 +49,7 @@ Each component is peer-style: the loader probes the host seam via `ctx.get(...)`
49
49
 
50
50
  | Component | Source | Seam (probed) | Translation |
51
51
  |---|---|---|---|
52
- | `commands` | manifest inline/source, or default `commands/*.md` | `commands` | registers each slash command via `register`; the handler returns the command content |
52
+ | `commands` | manifest inline/source, or default `commands/*.md` | `commands` | registers each slash command via `register`; the handler substitutes `$ARGUMENTS` into the body, passes the resulting user message through `@dsh-cc/moa`'s `routeBeforeAdmission` (a hard dependency), then dispatches it as a user prompt on the invoking agent |
53
53
  | `agents` | `agents/` dir or manifest paths | `subagents` | loads `AgentDefinition`s via `loadAgentsDir` and registers each as a named provider via `registerProvider` — namespaced under the plugin name (`namespacePrefix: manifest.name`), so `provider.name` is the scoped id `plugin:agent` while `provider.definition.agentType` stays bare; the provider also exposes its `definition` for the Task tool's live enumeration. Mounting **without** a `namespacePrefix` keeps bare names — such agents are then **undiscoverable to the Task tool** (a back-compat escape hatch, not a supported dispatch mode) |
54
54
  | `skills` | `skills/` dir or manifest paths | `skills` | discovers `SKILL.md` via `discoverCcSkills`, parses frontmatter, and registers each as a runtime skill via `register`; the skill name is its directory name, falling back to the frontmatter `name` when the directory name is not a valid registry name (e.g. a versioned plugin root listed as `"skills": ["./"]`), `src/skills.ts:resolveSkillName` |
55
55
  | `hooks` | `hooks/hooks.json` or inline | `hooks` (guest) | injects the per-event hook map via `mergePluginHooks` |
@@ -58,6 +58,16 @@ Each component is peer-style: the loader probes the host seam via `ctx.get(...)`
58
58
 
59
59
  The `hooks` and `mcp` seams have no harness-owned service in this package itself; a deployment that wants those components provides a guest seam or they are reported skipped. The dsh host wiring now supplies the `mcp` seam: the cc-shell glue provides a built-in `mcp` seam (`cc-shell/src/mcpSeam.ts`, the `cc-mcp-seam` child plugin), so plugin `mcpServers` mount for real in shipped deployments (see docs/plans/2026-09-07-plugin-mcp-seam.md). `hooks` remains host-depended.
60
60
 
61
+ ### Settings namespace: `actor-contract`
62
+
63
+ At mount the loader installs the `actor-contract` settings section for the actor-contract gate: the model-pattern list that decides whether a marked actor-contract block survives into a subagent persona. The patterns are read live at spawn time, so a settings edit applies on the next spawn.
64
+
65
+ | Key | Type | Default | Meaning |
66
+ |---|---|---|---|
67
+ | `models` | string[] | `['glm-*']` (`DEFAULT_ACTOR_CONTRACT_MODELS`) | Case-insensitive globs (`*` the only wildcard) matched against a spawn's candidate model ids; the block survives only for a matching spawn. An explicit `[]` stays a real array and closes the gate. |
68
+
69
+ The section (and `gateCandidates` / `DEFAULT_ACTOR_CONTRACT_MODELS`, re-exported from `@dsh-cc/claude-code-agents`) is `installSectionSafe`-installed, so co-mounting with `@dsh-cc/subagent-task` is safe and either mount order wins. No cordis service is provided here: the task package owns `ccActorContractGate`.
70
+
61
71
  ## Cursor dialect
62
72
 
63
73
  Cursor plugins load through the same pipeline as CC plugins — one tolerant parser with flavor-keyed branches, not a second loader. The dialect delta is manifest candidates plus small per-component normalizations; every degraded or ignored field surfaces as a warning on the load report.
package/README.zh.md CHANGED
@@ -49,7 +49,7 @@ JSON 读失败与缺失的 `installPath` 会跳过而不是抛错。项目/local
49
49
 
50
50
  | 组件 | 来源 | Seam(探测) | 翻译 |
51
51
  |---|---|---|---|
52
- | `commands` | 清单内联/source,或默认 `commands/*.md` | `commands` | 通过 `register` 注册每个斜杠命令;handler 返回命令内容 |
52
+ | `commands` | 清单内联/source,或默认 `commands/*.md` | `commands` | 通过 `register` 注册每个斜杠命令;handler 把 `$ARGUMENTS` 代入正文,让生成的用户消息先经过 `@dsh-cc/moa` 的 `routeBeforeAdmission`(硬依赖),再作为用户提示派发到发起调用的 agent |
53
53
  | `agents` | `agents/` 目录或清单路径 | `subagents` | 通过 `loadAgentsDir` 加载 `AgentDefinition`,再通过 `registerProvider` 注册为命名 provider——以插件名做命名空间(`namespacePrefix: manifest.name`),因此 `provider.name` 是 scoped id `plugin:agent`,而 `provider.definition.agentType` 保持裸名;provider 还会暴露其 `definition`,供 Task 工具实时枚举。**不带** `namespacePrefix` 挂载则保持裸名——这些 agent 随后**对 Task 工具不可见**(一种向后兼容的逃生舱口,不是受支持的派发模式) |
54
54
  | `skills` | `skills/` 目录或清单路径 | `skills` | 通过 `discoverCcSkills` 发现 `SKILL.md`、解析 frontmatter,再通过 `register` 注册为运行时技能;技能名取其目录名,目录名不是合法注册名时(例如清单以 `"skills": ["./"]` 把带版本号的插件根目录列为技能根)回退到 frontmatter 的 `name`,见 `src/skills.ts:resolveSkillName` |
55
55
  | `hooks` | `hooks/hooks.json` 或内联 | `hooks`(guest)| 通过 `mergePluginHooks` 注入按事件组织的 hook 映射 |
@@ -58,6 +58,16 @@ JSON 读失败与缺失的 `installPath` 会跳过而不是抛错。项目/local
58
58
 
59
59
  `hooks` 与 `mcp` seam 在本包内没有 harness 自有的服务;希望挂载这些组件的部署应提供 guest seam,否则它们会被报告为 `skipped`。dsh 的宿主接线现已提供 `mcp` seam:cc-shell glue 内置提供 `mcp` seam(`cc-shell/src/mcpSeam.ts`,即 `cc-mcp-seam` 子插件),因此在发布的部署中插件的 `mcpServers` 会真正挂载(见 docs/plans/2026-09-07-plugin-mcp-seam.md)。`hooks` 仍依赖宿主提供。
60
60
 
61
+ ### 设置命名空间:`actor-contract`
62
+
63
+ 挂载时加载器安装 `actor-contract` 设置段,供 actor-contract 闸门使用:该模型模式列表决定被标记的 actor-contract 块能否保留进 subagent 的 persona。模式在派发时实时读取,因此修改设置在下一次派发即生效。
64
+
65
+ | 键 | 类型 | 默认 | 含义 |
66
+ |---|---|---|---|
67
+ | `models` | string[] | `['glm-*']`(`DEFAULT_ACTOR_CONTRACT_MODELS`) | 大小写不敏感的 glob(`*` 是唯一通配符),与某次派发的候选 model id 匹配;只有匹配的派发才保留该块。显式 `[]` 仍是真实数组,并关闭闸门。 |
68
+
69
+ 该设置段(以及从 `@dsh-cc/claude-code-agents` 再导出的 `gateCandidates` / `DEFAULT_ACTOR_CONTRACT_MODELS`)经 `installSectionSafe` 安装,因此与 `@dsh-cc/subagent-task` 共同挂载是安全的,任意挂载顺序都能生效。此处不提供任何 cordis 服务:`ccActorContractGate` 归 task 包所有。
70
+
61
71
  ## Cursor 方言
62
72
 
63
73
  Cursor 插件走与 CC 插件相同的加载管线——同一个宽容解析器加上按方言分支的 key,而不是第二个加载器。方言差异是清单候选外加少量逐组件的规范化;每个被降级或被忽略的字段都会作为加载报告上的 warning 呈现。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dsh-cc/plugin-loader",
3
3
  "description": "Load Claude Code plugin.json manifests as in-memory dsh plugin mounts",
4
- "version": "0.9.5",
4
+ "version": "0.9.6-rc.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/dsh-cc/dsh-cc.git",
@@ -24,9 +24,9 @@
24
24
  "./package.json": "./package.json"
25
25
  },
26
26
  "dependencies": {
27
- "@dsh-cc/moa": "^0.9.5",
28
- "@dsh-cc/model-aliases": "^0.9.5",
29
- "@dsh-cc/settings": "^0.9.5"
27
+ "@dsh-cc/settings": "^0.9.6-rc.1",
28
+ "@dsh-cc/moa": "^0.9.6-rc.1",
29
+ "@dsh-cc/model-aliases": "^0.9.6-rc.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@deepseek-ai/cordis": "link:../../../../deepseek-harness/vendor/cordis",
@@ -36,13 +36,13 @@
36
36
  "@deepseek-ai/dsh-skill": "link:../../../../deepseek-harness/packages/skill/skill",
37
37
  "@deepseek-ai/dsh-subagent": "link:../../../../deepseek-harness/packages/subagent/subagent",
38
38
  "@deepseek-ai/schemastery": "link:../../../../deepseek-harness/vendor/schemastery",
39
- "@dsh-cc/claude-code-agents": "^0.9.5",
40
- "@dsh-cc/hook-protocol": "^0.9.5",
41
- "@dsh-cc/mcp-client": "^0.9.5",
42
- "@dsh-cc/model-aliases": "^0.9.5",
43
- "@dsh-cc/settings": "^0.9.5",
44
- "@dsh-cc/tools": "^0.9.5",
45
- "@dsh-cc/skill-loader": "^0.9.5"
39
+ "@dsh-cc/hook-protocol": "^0.9.6-rc.1",
40
+ "@dsh-cc/claude-code-agents": "^0.9.6-rc.1",
41
+ "@dsh-cc/mcp-client": "^0.9.6-rc.1",
42
+ "@dsh-cc/model-aliases": "^0.9.6-rc.1",
43
+ "@dsh-cc/settings": "^0.9.6-rc.1",
44
+ "@dsh-cc/skill-loader": "^0.9.6-rc.1",
45
+ "@dsh-cc/tools": "^0.9.6-rc.1"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "@deepseek-ai/cordis": ">=0.2.0-rc.2",
@@ -52,12 +52,12 @@
52
52
  "@deepseek-ai/dsh-skill": ">=0.2.2-rc.1",
53
53
  "@deepseek-ai/dsh-subagent": ">=0.2.2-rc.1",
54
54
  "@deepseek-ai/schemastery": "^3.18.1",
55
- "@dsh-cc/claude-code-agents": "^0.9.5",
56
- "@dsh-cc/hook-protocol": "^0.9.5",
57
- "@dsh-cc/mcp-client": "^0.9.5",
58
- "@dsh-cc/tools": "^0.9.5",
59
- "@dsh-cc/skill-loader": "^0.9.5",
60
- "@dsh-cc/settings": "^0.9.5"
55
+ "@dsh-cc/hook-protocol": "^0.9.6-rc.1",
56
+ "@dsh-cc/mcp-client": "^0.9.6-rc.1",
57
+ "@dsh-cc/claude-code-agents": "^0.9.6-rc.1",
58
+ "@dsh-cc/skill-loader": "^0.9.6-rc.1",
59
+ "@dsh-cc/settings": "^0.9.6-rc.1",
60
+ "@dsh-cc/tools": "^0.9.6-rc.1"
61
61
  },
62
62
  "files": [
63
63
  "lib"