Перейти к основному содержимому
X

ugc-asset-search-dsh-plugin

xiaomol444/ugc-asset-search-dsh-plugin

Search Miliastra Wonderland assets and show cards in DeepSeek Harness chat with sound previews, visual effect videos, and music links.

Установка

dsh plugin --profile web add github:xiaomol444/ugc-asset-search-dsh-plugin

README

Miliastra assets · 千星奇域素材

A DeepSeek Harness bundle that turns the Codex ugc-asset-search skill and its show_asset_cards MCP app into a native Harness surface: an agent tool over the same search core, and a Turn tail that draws that bundle's own HTML result card below the answer.

Where it appears

  • Cards under the answer — a Turn that ran a miliastra_assets search or details call ends with that bundle's own HTML result card below the reply: the Codex results.html document, served by this Host and embedded for the Turn. The card's own expand action moves it into a right-side drawer, so the conversation stays visible beside it. The triggering tool call stays a one-line process row that can still reveal the same assets as a compact list.
  • Agent tool — miliastra_assets, with action search, details, status and sync.
  • Original web page — https://tool.xiaomol444.xyz/AISearch.

How the cards get their data

The tool declares output.render for the model (one line per asset) and output.presentationMeta for the client, in the field names the Codex card app already reads (resourceId, description, hasAudio, media). DSH persists that projection with the tool result. The browser half registers a Conversation event definition for miliastra-cards, which turns each such result into Turn-scoped Location data; the conversation.chat.turnTail entry then draws that data after the Turn's answer, as an iframe over the Host's /miliastra-assets/api/card document. The frame is handed the same payload the MCP App used to receive (window.openai.toolOutput), answers its ui/initialize, and follows the height it reports. Reopening a Session rebuilds the tail from the log; a build without this bundle's client half still gets a readable text result.

The card document lives under vendor/ugc-card/ and is that bundle's own results.html, results.css and results.js, so the visual is the Codex one — including its own light palette, which does not follow the Harness theme.

Freshness

A machine that has never synced has no catalog, so search, details and status report needsSync instead of failing: the model asks the user before the first ~54 MB download, and only then runs sync.

After that, a search reads two small markers at most once per interval, in parallel with the local search: the catalog release (AISearch/index.json) and the site prompt (AISearch/SystemPrompt.md). Either can be newer than the cache, and each is reported once — updateAvailable: { current, latest } for the catalog, guidanceUpdate: { version } for the prompt — so the model asks before syncing. Nothing downloads on its own.

  • MILIASTRA_ASSET_CHECK_INTERVAL — milliseconds between marker reads (default 300000; off disables the check).
  • MILIASTRA_ASSET_AUTO_SYNC=on — download a newer release in the background instead of asking; the next search reports catalogUpdated, a failure is reported once and retried no sooner than ten minutes later.
  • MILIASTRA_ASSET_GUIDANCE=off — do not inject the site prompt as a system prompt section.

The site prompt

sync also caches the site's Markdown prompt as ~/.cache/ugc-asset-search-v1/search-guidance.json. The plugin injects it as a system prompt section (miliastra-assets:search-guidance, order 5000) so the model picks keywords by the same rules as the web page; the section text is re-read when the cached file changes, and its RESULT_LIMIT token is bound to this plugin's default of 15. Prompt and catalog updates arrive together with a sync.

Where the data comes from

Search reads the catalog cache the ugc-asset-search skill keeps at ~/.cache/ugc-asset-search-v1/catalog.json (override with the MILIASTRA_ASSET_CACHE environment variable). Nothing is re-downloaded for a normal search. The skill's runtime modules are vendored under vendor/ugc-asset-search/ unchanged.

“同步目录” (action: "sync") runs that skill's own sync command, which reads the public OSS catalog and preview metadata. Audio, effect video and covers then stream from the same public origin; music opens on NetEase Music.

Companion work in the same panel

The panel searches, filters by asset kind, plays audio and effect video, and expands full descriptions, keywords and suggested uses per hit. Detail text and coverage numbers come from the catalog itself, so a missing description is reported rather than invented.

Turning it off

Disabling the bundle removes the sidebar entry, the panel and the tool together; the catalog cache stays on disk for the terminal skill to reuse.

Похожие плагины