@deepseek-ai/dsh-agent-preset 0.1.7-rc.2 → 0.2.0-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
@@ -15,8 +15,8 @@
15
15
  en: d152484eb41ac6b4
16
16
  zh: b3ad7867f23dad1c
17
17
  /deepseek-ai-dsh-agent-preset/use-this-package:
18
- en: a403abbf4d126f04
19
- zh: d8d1d643e789cd1f
18
+ en: 3e243b0ee04dd23f
19
+ zh: 832841c35b57180a
20
20
  /deepseek-ai-dsh-agent-preset/understand-the-implementation:
21
21
  en: 7ac55a3a3af4fcef
22
22
  zh: 95fe36abba794967
@@ -30,8 +30,8 @@
30
30
  en: 4644bd5f0c865667
31
31
  zh: 9aedc8ac43fb8b61
32
32
  /deepseek-ai-dsh-agent-preset/known-limitations-and-deferred-work:
33
- en: d4dbce86236e8e91
34
- zh: 11766aef5d0ff536
33
+ en: 4546a11627bbbca1
34
+ zh: eaa260cdfe37e31f
35
35
  /deepseek-ai-dsh-agent-preset/known-limitations-and-deferred-work/dev-note:
36
36
  en: af1f8da6d3acb3e2
37
37
  zh: e0c4f6afeefd5214
package/README.md CHANGED
@@ -47,7 +47,9 @@ Define an Agent’s child plugins in ordinary Cordis YAML. Declare several prese
47
47
 
48
48
  The declaration row’s `id` addresses Loader edits; `config.id` is the preset identity saved by sessions. Child entry IDs may be omitted and assigned by Loader.
49
49
 
50
- The package also ships the `skills/` directory that creator mode mounts through `skill-filesystem`: `cordis-plugin-development` (a short procedure with `references/` read on demand and copyable `templates/` bundles), `editing-cordis-compositions`, and `cordis-composition-reference`, whose `references/packages.md` is generated by `scripts/gen-plugin-packages.ts` and freshness-gated in `doc-sync`. The two procedure skills tell the agent to read inspection results first, then the package README under the `packageDir` that `Config.listConfigs` reports, then built `lib/` or checkout sources. Every shipped `SKILL.md`, rendered as a `skill` tool result, stays under the 8192-character threshold above which the standard preset's tool-result pruner trims results.
50
+ The package also ships the `skills/` directory that creator mode mounts through `skill-filesystem`: `agent-experience` (tool descriptions and efficient context loading), `cordis-plugin-development` (a short procedure with `references/` read on demand and copyable `templates/` bundles), `editing-cordis-compositions`, and `cordis-composition-reference`, whose `references/packages.md` is generated by `scripts/gen-plugin-packages.ts` and freshness-gated in `doc-sync`. The two procedure skills tell the agent to read inspection results first, then the package README under the `packageDir` that `Config.listConfigs` reports, then built `lib/` or checkout sources. Every shipped `SKILL.md`, rendered as a `skill` tool result, stays under the 8192-character threshold above which the standard preset's tool-result pruner trims results.
51
+
52
+ Edit `agent-experience` in [skills/agent-experience/SKILL.md](skills/agent-experience/SKILL.md). The repository discovery path, `.agents/skills/agent-experience/SKILL.md`, is a relative symbolic link to this file; the published package contains the regular file.
51
53
 
52
54
  <a id="understand-the-implementation"></a>
53
55
  ## Understand the implementation
@@ -80,6 +82,7 @@ A live Agent’s composition stays stable; new Agents can use an updated definit
80
82
  <a id="known-limitations-and-deferred-work"></a>
81
83
 
82
84
  - Requires the `agentPresets` service. Duplicate preset IDs fail declaration loading. Declarations provide no directory, file-copy or file-delete operations.
85
+ - Repository discovery of `agent-experience` requires a checkout with symbolic links enabled. With `core.symlinks=false`, Git writes the link target as plain text, not a skill. Creator mode uses the regular file in the package and does not depend on that alias.
83
86
 
84
87
  <a id="dev-note"></a>
85
88
  ### Dev Note
package/README.zh.md CHANGED
@@ -47,7 +47,9 @@ kind: "package-reference"
47
47
 
48
48
  声明行的 `id` 是 Loader 编辑地址;`config.id` 是会话保存的 preset 标识符。子插件可省略行 ID,由 Loader 分配。
49
49
 
50
- 本包还随包出货创造模式通过 `skill-filesystem` 挂载的 `skills/` 目录:`cordis-plugin-development`(简短流程,配合按需读取的 `references/` 与可复制的 `templates/` 组合包)、`editing-cordis-compositions`,以及 `cordis-composition-reference`,后者的 `references/packages.md` 由 `scripts/gen-plugin-packages.ts` 生成并在 `doc-sync` 中做新鲜度门禁。两个流程 skill 让 agent 先读检查结果,再读 `Config.listConfigs` 报告的 `packageDir` 下的包 README,最后读构建后的 `lib/` 或 checkout 源码。每个出货的 `SKILL.md` 作为 `skill` 工具结果渲染后都保持在 8192 字符阈值之下,标准 preset 的工具结果修剪器超过该阈值才会裁剪。
50
+ 本包还随包出货创造模式通过 `skill-filesystem` 挂载的 `skills/` 目录:`agent-experience`(工具描述与高效上下文加载)、`cordis-plugin-development`(简短流程,配合按需读取的 `references/` 与可复制的 `templates/` 组合包)、`editing-cordis-compositions`,以及 `cordis-composition-reference`,后者的 `references/packages.md` 由 `scripts/gen-plugin-packages.ts` 生成并在 `doc-sync` 中做新鲜度门禁。两个流程 skill 让 agent 先读检查结果,再读 `Config.listConfigs` 报告的 `packageDir` 下的包 README,最后读构建后的 `lib/` 或 checkout 源码。每个出货的 `SKILL.md` 作为 `skill` 工具结果渲染后都保持在 8192 字符阈值之下,标准 preset 的工具结果修剪器超过该阈值才会裁剪。
51
+
52
+ 在 [skills/agent-experience/SKILL.md](skills/agent-experience/SKILL.md) 编辑 `agent-experience`。仓库发现路径 `.agents/skills/agent-experience/SKILL.md` 是指向该文件的相对符号链接;发布包包含普通文件。
51
53
 
52
54
  <a id="understand-the-implementation"></a>
53
55
  ## 理解实现
@@ -80,6 +82,7 @@ kind: "package-reference"
80
82
  <a id="known-limitations-and-deferred-work"></a>
81
83
 
82
84
  - 需要 `agentPresets` 服务。重复的 preset ID 会导致声明加载失败。声明不提供目录、文件复制或文件删除操作。
85
+ - 从仓库发现 `agent-experience` 要求 checkout 启用符号链接。设置 `core.symlinks=false` 时,Git 会将链接目标写成纯文本,而不是 skill。创造模式使用包内的普通文件,不依赖该别名。
83
86
 
84
87
  <a id="dev-note"></a>
85
88
  ### 开发备注
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-agent-preset",
3
3
  "description": "Declare an Agent capability composition in Cordis YAML",
4
- "version": "0.1.7-rc.2",
4
+ "version": "0.2.0-rc.2",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -30,7 +30,7 @@
30
30
  "peerDependencies": {
31
31
  "@deepseek-ai/cordis": "~4.0.4",
32
32
  "@deepseek-ai/cordis-plugin-loader": "~1.0.5",
33
- "@deepseek-ai/dsh-agent-preset-registry": "0.1.7-rc.2"
33
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2"
34
34
  },
35
35
  "dependencies": {
36
36
  "@deepseek-ai/schemastery": "~3.18.4"
@@ -39,11 +39,12 @@
39
39
  "@types/js-yaml": "^4.0.9",
40
40
  "js-yaml": "^4.2.0",
41
41
  "@deepseek-ai/cordis": "~4.0.4",
42
- "@deepseek-ai/cordis-plugin-include": "~1.0.9",
43
42
  "@deepseek-ai/cordis-plugin-loader": "~1.0.5",
44
- "@deepseek-ai/dsh-agent-preset-registry": "0.1.7-rc.2",
45
- "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.1.7-rc.2",
46
- "@deepseek-ai/dsh-skill": "0.1.7-rc.2",
43
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.0-rc.2",
44
+ "@deepseek-ai/cordis-plugin-include": "~1.0.9",
45
+ "@deepseek-ai/dsh-compaction-tool-result-pruner": "0.2.0-rc.2",
46
+ "@deepseek-ai/dsh-skill": "0.2.0-rc.2",
47
+ "@deepseek-ai/dsh-skill-filesystem": "0.2.0-rc.2",
47
48
  "@deepseek-ai/schemastery": "~3.18.4"
48
49
  }
49
50
  }
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: agent-experience
3
+ description: Use when writing or changing a model-facing tool definition (name, description, parameter schema, or its system-prompt section), and when designing skills, context loading, or multi-step workflows, to make information discoverable and use context efficiently.
4
+ ---
5
+
6
+ - **Start with minimal context:** expose purpose, available actions, and constraints first; load detailed instructions when needed.
7
+ - **Make discovery explicit:** every deferred resource needs a clear description and a reliable way to retrieve it.
8
+ - **Keep critical constraints visible:** permissions, destructive effects, and required validation should appear before the relevant action.
9
+ - **Prefer bounded outputs:** return concise results with identifiers or paths for retrieving details; avoid dumping entire logs or documents.
10
+ - **Use locality:** include a bounded amount of likely needed adjacent context with an operation’s result. For example, deliver a thread reply with a few preceding messages. Mark omissions and truncation explicitly, and provide a way to retrieve more.
11
+ - **Evaluate total work:** saving context is useful only if it does not cause more searches, repeated reads, or mistakes.
12
+
13
+ ## Tool definitions
14
+
15
+ - **Delete obvious constraints.** Omit rules the model learns from the call result, such as a missing file failing to read or a failed send not being delivered.
16
+ - **Describe behavior, not implementation.** State what the tool does and returns; omit internal mechanisms, output markers the model sees in results, and enforcement details.
17
+ - **Put parameter rules on the parameter.** Defaults, ranges, pairing, and when-to-set rules belong in that parameter's description or schema; a description that varies with configuration usually means the varying part belongs to a parameter.
18
+ - **Say each fact once.** Do not repeat the tool definition in its system-prompt section, a parameter description in the tool description, or one tool's rules in another tool.
19
+ - **Measure the change.** Compare first-turn prompt tokens before and after a tool-definition change.
@@ -62,6 +62,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
62
62
  | `@deepseek-ai/dsh-client-hmr` | yes | Web client graph synchronization and rebuilt-bundle reload transport |
63
63
  | `@deepseek-ai/dsh-client-locale` | no | Locale plugin: Host-backed preference, extensible language catalog, browser fallback, and typed built-in dictionaries |
64
64
  | `@deepseek-ai/dsh-client-modules` | no | Client module system, dual-face: node half composes the __DSH_BOOT__ entry graph (incremental dsh.client scan, bundle route, index tap, webPlugins service); browser half is the lazy-CJS module table the vendored cordis Loader consumes as its internal seam |
65
+ | `@deepseek-ai/dsh-client-product-analytics` | yes | Desktop product event collection and authenticated Host reporting |
65
66
  | `@deepseek-ai/dsh-client-resources` | no | Unified client resource model: protocol-registered providers turn URL addresses into live values, consumed through the useResource global standard hook |
66
67
  | `@deepseek-ai/dsh-client-shortcuts` | yes | Application keyboard command registry and physical-key routing |
67
68
  | `@deepseek-ai/dsh-client-ui-agent-preset` | no | Agent-preset surfaces: the default for later sessions, this session's seat, and the composition editor |
@@ -95,6 +96,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
95
96
  | `@deepseek-ai/dsh-client-ui-settings-models` | yes | Models settings and shared product-onboarding dialogs over existing settings and credential joins |
96
97
  | `@deepseek-ai/dsh-client-ui-settings-plugin-inventory` | no | Read-only Cordis Loader inventory tab in Web Plugins settings |
97
98
  | `@deepseek-ai/dsh-client-ui-settings-plugins` | no | Built-in plugins settings section for the dsh web client: the Settings navigation entry and the tab chrome feature-owned tabs register into |
99
+ | `@deepseek-ai/dsh-client-ui-settings-session-log` | no | General settings control for Session-log upload with DeepSeek API requests |
98
100
  | `@deepseek-ai/dsh-client-ui-settings-shell` | no | Settings page of the shell executor on the dsh web client's Plugins page: the command timeout and the per-stream output cap of the shell namespace |
99
101
  | `@deepseek-ai/dsh-client-ui-settings-subagent` | no | Settings page of Subagent delegation on the dsh web client's Plugins page: recursion depth, parallel capacity, and the models agents may choose for subagents |
100
102
  | `@deepseek-ai/dsh-client-ui-settings-web-search` | no | Settings page of the DeepSeek web-search provider on the dsh web client's Plugins page: its API key, endpoint, and per-request search budget |
@@ -261,7 +263,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
261
263
  |---|---|---|
262
264
  | `@deepseek-ai/dsh-commands` | no | Plugin-owned human command registry for DeepSeek Harness UIs |
263
265
  | `@deepseek-ai/dsh-permission-presets` | yes | User-facing permission presets (ctx.permissionPresets) for the DeepSeek Harness: one product-level Permissions select bundling the sandbox-mode and approval-policy knobs, written through to their own session events |
264
- | `@deepseek-ai/dsh-tool-ask-user` | no | Model-facing ask_user_question tool over the ctx.userQuestions seam |
266
+ | `@deepseek-ai/dsh-tool-ask-user` | yes | Model-facing ask_user_question tool over the ctx.userQuestions seam |
265
267
  | `@deepseek-ai/dsh-user-approval` | yes | User-approval seam (ctx.approval) for the DeepSeek Harness: one-shot permission decisions dispatched to composed answerers over the approval/request waterfall, fail-closed by default |
266
268
  | `@deepseek-ai/dsh-user-questions` | no | Abstract user-questions seam (ctx.userQuestions) for asking the human during agent runs |
267
269
 
@@ -355,7 +357,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
355
357
  | `@deepseek-ai/dsh-session-projection` | no | Session-projection seam: the merge-extensible projection type table, the provider contract, and the ctx.sessionProjections registry serving whole current values of log-derived per-session state |
356
358
  | `@deepseek-ai/dsh-session-projection-cache` | yes | Persisted projection cache (ctx.sessionProjectionCache): durable per-session checkpoint records on the session_projcache storage domain (per-record layout), throttled write-behind, and the cached listing read |
357
359
  | `@deepseek-ai/dsh-session-stats` | no | Whole-log conversation counts and wall times projection (sessionStats) for the DeepSeek Harness |
358
- | `@deepseek-ai/dsh-session-telemetry-otel` | yes | OpenTelemetry backend for the DeepSeek Harness telemetry seam: hands captured session records to the OTel JS SDK's log pipeline |
360
+ | `@deepseek-ai/dsh-session-telemetry-otel` | yes | Feedback-authorized Session logs over byte-bounded OpenTelemetry HTTP requests |
359
361
  | `@deepseek-ai/dsh-session-title` | yes | Log-backed session title service and provider registry for the DeepSeek Harness |
360
362
  | `@deepseek-ai/dsh-session-title-all-prompts-llm` | yes | All-user-messages LLM provider plugin for DeepSeek Harness session titles |
361
363
  | `@deepseek-ai/dsh-session-title-first-prompt-llm` | yes | First-message LLM provider plugin for DeepSeek Harness session titles |
@@ -445,6 +447,12 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
445
447
  |---|---|---|
446
448
  | `@deepseek-ai/dsh-subprocess-local` | no | Local-subprocess implementation of the DeepSeek Harness subprocess seam |
447
449
 
450
+ ## telemetry
451
+
452
+ | Package | Config | Description |
453
+ |---|---|---|
454
+ | `@deepseek-ai/dsh-otel` | no | Cordis service for independent ordinary-event and byte-bounded Session-log OTLP channels |
455
+
448
456
  ## terminal
449
457
 
450
458
  | Package | Config | Description |
@@ -1,14 +1,18 @@
1
1
  ---
2
2
  name: cordis-plugin-development
3
- description: Use when adding, enabling, disabling, installing, configuring, or debugging a plugin, bundle, feature, page, panel, tool, or MCP connection in the current Harness profile, including a shipped plugin that is disabled by default, and for any visual object, decoration, or widget request that names no other destination, which means an installed UI plugin rendered in the Harness Web UI.
3
+ description: Use when designing, reviewing, adding, enabling, disabling, installing, configuring, or debugging a plugin, bundle, feature, page, panel, tool, or MCP connection in the current Harness profile, including a shipped plugin that is disabled by default, and for any visual object, decoration, or widget request that names no other destination, which means an installed UI plugin rendered in the Harness Web UI.
4
4
  ---
5
5
 
6
6
  # Persistent Harness plugins
7
7
 
8
- Use ordinary workspace files to author a bundle, then `plugin_manager` with `action: install_bundle` and the absolute package directory as `target` to install it in the current profile. Changes affect every session in that profile and survive restart. Load `editing-cordis-compositions` for agent preset changes.
8
+ For implementation, use ordinary workspace files to author a bundle, then `plugin_manager` with `action: install_bundle` and the absolute package directory as `target` to install it in the current profile. Changes affect every session in that profile and survive restart. Load `editing-cordis-compositions` for agent preset changes.
9
9
 
10
10
  Do not write the profile's `package.json` or `cordis.patch.yml`, create packages under `$DSH_HOME`, or run pnpm in the profile directory: `install_bundle` performs those steps, and each hand-made write outside the workspace needs its own approval. Every `plugin_manager` action, including `list_plugins` and `list_bundles`, also needs approval without Full access, so call it only when its result decides the next step.
11
11
 
12
+ ## Design or review
13
+
14
+ Read the applicable references below and inspect the proposed or existing plugin against current APIs. Report design choices or findings instead of following the installation workflow. Do not write files, install bundles, or change profile state unless the user requests implementation.
15
+
12
16
  ## Enable a shipped plugin
13
17
 
14
18
  A shipped bundle can resolve a plugin row and leave it `disabled`. The row id and its reason are in the shipped patch, `packages/bundle/*/cordis.patch.yml` in a source checkout. Write a workspace bundle whose patch overrides that row with `disabled: false` and inserts the Host rows it depends on; a source checkout's `apps/cli/config/examples/<feature>/cordis.yml` lists them for opt-in features. Packages shipped with dsh resolve from the dsh installation, so the bundle declares no dependencies on them. Install it with `install_bundle`.
@@ -16,9 +20,9 @@ A shipped bundle can resolve a plugin row and leave it `disabled`. The row id an
16
20
  ## Deliver a working plugin first
17
21
 
18
22
  1. Resolve the requested result and destination. An unspecified visual destination is the current Harness Web UI; a standalone image or HTML file does not complete such a request. Choose reasonable visual details and implement a small first version; install it before visual refinement.
19
- 2. Discover only the APIs needed for that version: `cordis_inspect_list`, then targeted `cordis_inspect_query` calls. For UI, query Client `Slots.listSubTree` and the selected slot's registration options and props. For anything beyond a static decoration, such as tool policy, agent context, session-derived state, or Chat rows, read `references/practices.md` before choosing the extension point. Once the chosen slot and registration API are known, write the plugin.
23
+ 2. Discover only the APIs needed for that version: `cordis_inspect_list`, then targeted `cordis_inspect_query` calls. For UI, query Client `Slots.listSubTree` and the selected slot's registration options and props. For anything beyond a static decoration, such as tool policy, agent context, session-derived state, or Chat rows, read `references/practices.md` before choosing the extension point; for a user action in plugin UI, also read `references/user-actions.md`. Once the chosen slot and registration API are known, write the plugin.
20
24
  3. Read the matching template under `templates/` with the file-read tool and write its copies into one workspace directory, or write the installable package, patch, and required Host/Client files there yourself. Check JavaScript syntax and the manifest, then install it. Before that first installation, do not create preview HTML, mock shells, design variants, screenshot scripts, or rasterizer tooling. Use the installed plugin itself as the first preview.
21
- 4. Read the installation result: its `application` and `warnings` fields decide whether the change is live, not server logs, terminal output, process lists, or the page's boot payload. Confirm new rows with `cordis_inspect_query`, which needs no approval, rather than paging `list_plugins`. After `application: applied`, exercise the capability or inspect the live Client registration. Use the connected page for visual verification when browser control is available. For a page or panel, also verify design consistency: styles use only theme tokens, the plugin imports no Harness Client package such as `@deepseek-ai/dsh-client-ui-primitives`, the console shows no slot entry crash, and the view reads correctly in light and dark themes beside a comparable host page. State any verification limitation explicitly; installation and slot registration alone do not establish what the user can see.
25
+ 4. Read the installation result: its `application` and `warnings` fields decide whether the change is live, not server logs, terminal output, process lists, or the page's boot payload. Confirm new rows with `cordis_inspect_query`, which needs no approval, rather than paging `list_plugins`. After `application: applied`, exercise the capability or inspect the live Client registration. Use the connected page for visual verification when browser control is available. For a page or panel, also verify design consistency: styles use only theme tokens, the plugin imports no Harness Client package such as `@deepseek-ai/dsh-client-ui-primitives`, the console shows no slot entry crash, and the view reads correctly in light and dark themes beside a comparable host page. For a user action, run the checks in `references/user-actions.md`. Scale verification to the change's risk; follow `references/verification.md` when browser control is unavailable. Restore any user setting or state changed while testing. State any verification limitation explicitly; installation and slot registration alone do not establish what the user can see.
22
26
  5. Fix observed defects in the same plugin. When the requested result works, finish with its location and verification status. Do not continue speculative visual variants, optional features, or a new mock preview. Close any task list you created.
23
27
 
24
28
  ## Knowledge sources, in order
@@ -43,3 +47,4 @@ The files below live in this skill's base directory, which the `skill` tool repo
43
47
  | MCP bundle starting point, two files | `templates/mcp/package.json`, `templates/mcp/cordis.patch.yml` |
44
48
  | Loader patch dialect and the list of installable plugin packages | the `cordis-composition-reference` skill |
45
49
  | Choosing extension points, contexts, and state mechanisms for upgrade stability and performance | `references/practices.md` |
50
+ | Sharing application operations between UI actions and agent tools | `references/user-actions.md` |
@@ -0,0 +1,15 @@
1
+ # User actions and agent tools
2
+
3
+ Expose the plugin UI's operations on application data and configuration to the agent. Pure view interactions, such as switching tabs or expanding details, do not need tools. Confirm the Host entry points and tools you use with `cordis_inspect_query` before relying on them.
4
+
5
+ ## One operation, two callers
6
+
7
+ 1. Implement the operation once as a Host service method. It returns the result or an explicit status, and a failure carries its reason.
8
+ 2. The UI action calls it through a Client-callable Host entry point found with inspection, such as a session command that `ctx.remote.commands.execute()` runs, and shows the returned failure.
9
+ 3. Expose the operation through an agent tool with matching parameters and meaning. Related operations may share a tool with an `action` parameter. The tool calls the same method and returns its result as the tool result.
10
+
11
+ An action that grants or confirms authority, such as approving a tool call, answering a question the agent asked, or loosening a policy, stays user-only. Do not maintain separate operation logic in the UI and tool paths.
12
+
13
+ ## Verification
14
+
15
+ For operations available to both callers, perform the operation through the tool alone and compare its state changes, return values, and failures with the UI action. For user-only actions, verify that the agent cannot execute or authorize them.