From d352a080fc357998a5327d2f984e332dffffb5ee Mon Sep 17 00:00:00 2001 From: turtle1999 Date: Tue, 20 Oct 2026 00:20:18 +0800 Subject: [PATCH] feat(agent-preset): require detail documents for creator bundles --- packages/preset/agent-preset/package.json | 1 + .../skills/cordis-plugin-development/SKILL.md | 12 +++++----- .../references/artwork.md | 6 ++++- .../references/host-plugin.md | 13 +++++----- .../templates/decoration/docs/DETAIL.md | 10 ++++++++ .../templates/decoration/locale/en.json | 3 ++- .../templates/decoration/package.json | 2 +- .../templates/mcp/docs/DETAIL.md | 11 +++++++++ .../templates/mcp/locale/en.json | 3 ++- .../templates/mcp/package.json | 2 +- .../preset/agent-preset/tests/skills.spec.ts | 24 +++++++++++++++---- pnpm-lock.yaml | 3 +++ 12 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 packages/preset/agent-preset/skills/cordis-plugin-development/templates/decoration/docs/DETAIL.md create mode 100644 packages/preset/agent-preset/skills/cordis-plugin-development/templates/mcp/docs/DETAIL.md diff --git a/packages/preset/agent-preset/package.json b/packages/preset/agent-preset/package.json index 93bd53b620..e82790b587 100644 --- a/packages/preset/agent-preset/package.json +++ b/packages/preset/agent-preset/package.json @@ -43,6 +43,7 @@ "@deepseek-ai/cordis-plugin-loader": "workspace:~", "@deepseek-ai/dsh-agent-preset-registry": "workspace:*", "@deepseek-ai/dsh-compaction-tool-result-pruner": "workspace:*", + "@deepseek-ai/dsh-plugin-detail": "workspace:*", "@deepseek-ai/dsh-skill": "workspace:*", "@deepseek-ai/dsh-skill-filesystem": "workspace:*", "@deepseek-ai/schemastery": "workspace:~", diff --git a/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md b/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md index b5136de5d3..5cb48b7fb0 100644 --- a/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md +++ b/packages/preset/agent-preset/skills/cordis-plugin-development/SKILL.md @@ -21,7 +21,7 @@ A shipped bundle can resolve a plugin row and leave it `disabled`. The row id an 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. 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. -3. Read and copy the matching template files into one workspace directory, or author the package, patch, and required Host/Client files there. Before installing, complete the display checklist in `references/host-plugin.md`: meaningful localized titles/descriptions, an original or licensed icon, and exported resources with distribution checks where applicable. This applies to Host-only and configuration-only bundles too; adapt template text and artwork to the request. Check JavaScript syntax and the manifest, then install. Use the installed plugin as the first preview; do not create preview HTML, mock shells, design variants, screenshot scripts, or rasterizer tooling first. +3. Read and copy the matching template files into one workspace directory, or author the package, patch, and required Host/Client files there. Before installing, complete the display checklist in `references/host-plugin.md`: localized titles, descriptions, and detail documents, an original or licensed icon, and exported resources with distribution checks where applicable. This applies to Host-only and configuration-only bundles too; adapt template text and artwork to the request. Check JavaScript syntax and the manifest, then install. Use the installed plugin as the first preview; do not create preview HTML, mock shells, design variants, screenshot scripts, or rasterizer tooling first. 4. Read the installation result: `application` and `warnings` decide whether the change is live, not logs, process lists, or the page's boot payload. Confirm new rows with approval-free `cordis_inspect_query`, not `list_plugins`. After `application: applied`, exercise the capability or inspect the live Client registration. Verify installed display metadata and the icon using `references/host-plugin.md`. Use the connected page when available; follow `references/verification.md` for page/panel design checks and unavailable browser control, and `references/user-actions.md` for user actions. Restore user state changed during testing. Report verification limits; installation and slot registration alone do not establish what the user sees. 5. Fix observed defects in the same plugin. When the requested result works, finish with its location, verification status, and the reason for any display-resource exception; never silently accept default artwork. Do not continue speculative variants, optional features, or mock previews. Close any task list. @@ -31,11 +31,11 @@ A shipped bundle can resolve a plugin row and leave it `disabled`. The row id an 2. Package documentation: `Config.listConfigs` with `name` set to the package finds its entries; querying one `entry` returns its `packageDir`, the resolved package directory. Read `/README.md`. Bundled packages resolve from the dsh installation and profile-installed bundles from the profile, so never guess the path from `$DSH_PROFILE_DIR`. 3. Source: installed packages ship built `lib/index.js` and `lib/types/**/*.d.ts` with JSDoc under that same `packageDir`, not `src/`; a source checkout of DSH has `packages///src`. Read them when inspection and the README leave a question open, and start source-level diagnosis from a concrete installation or runtime failure. -`DSH_PROFILE` (profile name) and `DSH_PROFILE_DIR` (its directory, whose `node_modules` holds only profile-installed bundles) are set in every shell call of a profile-launched Harness and absent when the Harness was booted without a profile. Bash reads them as `$DSH_PROFILE`; PowerShell, which the Windows preset uses, reads them as `$env:DSH_PROFILE`. With `dsh` on the PATH, `dsh --profile "$DSH_PROFILE" --dump-config` prints the composed profile. +`DSH_PROFILE` (profile name) and `DSH_PROFILE_DIR` (its directory, whose `node_modules` holds only profile-installed bundles) are set in every shell call of a profile-launched Harness and absent when the Harness was booted without a profile. Bash reads them as `$DSH_PROFILE`; PowerShell reads them as `$env:DSH_PROFILE`. With `dsh` on the PATH, `dsh --profile "$DSH_PROFILE" --dump-config` prints the composed profile. ## Read next -The files below live in this skill's base directory, which the `skill` tool reported, and the table is the complete list: do not enumerate that directory. In every deployment, including a source checkout, read these files with the file-read tool, write copies into the workspace with the file-write tool, and verify a copy by reading it back. In Desktop the directory sits inside `app.asar`, which only the Host process's own file reads can open; shell commands (`ls`, `cat`, `cp`, `cmp`), the glob and search tools (they run a native ripgrep process), `node`, and pnpm all fail on it. Never install or syntax-check a template in place; copy its contents into the workspace first. +The files below live in this skill's base directory, which the `skill` tool reported, and the table is the complete list: do not enumerate that directory. In every deployment, including a source checkout, read these files with the file-read tool, write copies into the workspace with the file-write tool, and verify a copy by reading it back. In Desktop the directory sits inside `app.asar`, which only the Host process's own file reads can open; shell commands (`ls`, `cat`, `cp`, `cmp`), the glob and search tools, `node`, and pnpm all fail on it. Never install or syntax-check a template in place; copy its contents into the workspace first. | Task | File | |---|---| @@ -43,9 +43,9 @@ The files below live in this skill's base directory, which the `skill` tool repo | Web UI: Client manifest, module loader, slot registration | `references/ui-plugin.md` | | Connecting an MCP server through a configuration-only bundle | `references/mcp-bundle.md` | | Page/panel design checks and verification without browser control | `references/verification.md` | -| Drawing an icon | `references/artwork.md` | -| UI plugin template, including display resources | `templates/decoration/package.json`, `templates/decoration/cordis.patch.yml`, `templates/decoration/index.js`, `templates/decoration/client.js`, `templates/decoration/locale/en.json`, `templates/decoration/icon.svg` | -| MCP bundle template, including display resources | `templates/mcp/package.json`, `templates/mcp/cordis.patch.yml`, `templates/mcp/locale/en.json`, `templates/mcp/icon.svg` | +| Icons and feature images | `references/artwork.md` | +| UI plugin template | `templates/decoration/package.json`, `templates/decoration/cordis.patch.yml`, `templates/decoration/index.js`, `templates/decoration/client.js`, `templates/decoration/locale/en.json`, `templates/decoration/docs/DETAIL.md`, `templates/decoration/icon.svg` | +| MCP bundle template | `templates/mcp/package.json`, `templates/mcp/cordis.patch.yml`, `templates/mcp/locale/en.json`, `templates/mcp/docs/DETAIL.md`, `templates/mcp/icon.svg` | | Loader patch dialect and the list of installable plugin packages | the `cordis-composition-reference` skill | | Choosing extension points, contexts, and state mechanisms for upgrade stability and performance | `references/practices.md` | | Sharing application operations between UI actions and agent tools | `references/user-actions.md` | diff --git a/packages/preset/agent-preset/skills/cordis-plugin-development/references/artwork.md b/packages/preset/agent-preset/skills/cordis-plugin-development/references/artwork.md index f29a03f2ea..15459666d9 100644 --- a/packages/preset/agent-preset/skills/cordis-plugin-development/references/artwork.md +++ b/packages/preset/agent-preset/skills/cordis-plugin-development/references/artwork.md @@ -1,6 +1,6 @@ # Plugin artwork -Draw an icon that is recognizable at row size and belongs beside the icons of installed DSH plugins. The display checklist in `references/host-plugin.md` owns manifest exports, accepted formats, size limits, and installed-display checks. +Draw an icon that is recognizable at row size and belongs beside the icons of installed DSH plugins, and, when it helps, a feature image for the detail document. The display checklist in `references/host-plugin.md` owns manifest exports, accepted formats, size limits, and installed-display checks. ## Establish the subject @@ -22,6 +22,10 @@ Draw an icon that is recognizable at row size and belongs beside the icons of in - Plugin Manager renders the icon through ``, which silently drops what it cannot load. Export self-contained SVG geometry with local, uniquely named gradient, mask, and clip references. Use no scripts, event handlers, `