# anime-find

> DeepSeek Harness plugin for in-conversation multi-source anime search. Aggregates results from Mikan

## Metadata

- Author: [@cocofhu](https://github.com/cocofhu)
- Repo: <https://github.com/cocofhu/anime-find.git>
- GitHub: [cocofhu/anime-find](https://github.com/cocofhu/anime-find)
- Stars: 155
- Language: TypeScript
- License: [MIT](https://spdx.org/licenses/MIT.html)
- Homepage: <https://github.com/cocofhu/anime-find#readme>
- Topics: `anime`, `anime-search`, `bangumi`, `deepseek`, `deepseek-harness`, `dsh`, `dsh-plugin`, `magnet`, `mikan`, `plugin`, `torrent`, `typescript`
- Forks: 32
- Open Issues: 1
- Last push: 2026-08-19T17:08:51.000Z
- Added: 2026-08-19T00:00:00.000Z

## Install

```bash
dsh plugin --profile web add github:cocofhu/anime-find
```

## Wiki

## One-Sentence Description
anime-find is an in-conversation anime search plugin for DeepSeek Harness Web, enabling Agents to directly display anime cards from Mikan/AniBT/AnimeGarden in replies, view magnet links, torrents, and Bangumi introductions on the same page, and even select episodes for playback directly in the conversation based on statically parsed rules.

## Core Capabilities
- **Multi-source aggregated search**: Simultaneously calls Mikan, AniBT, and AnimeGarden, merging and displaying cards by source; single source failure doesn't block other sources
- **Bangumi index completion**: Auto-completes ratings, original titles, and tags for each card (direct pull if bgmId exists, otherwise search by title)
- **Resource detail panel**: Browse episodes by subgroup, with one-click magnet copy and .torrent download links
- **Bangumi introduction and short reviews**: Detail card loads introduction, rating, genre tags, and up to 5 short reviews; hides corresponding Tab when Bangumi is unavailable
- **Streaming online playback**: Attempts trial playback based on search results at statically parsed rule sites; rewrites HLS segment links after proxying through Host
- **Smart follow-up**: Recognizes commands like "any more", "show another batch", "recommend more", and automatically flips to the next batch of results
- **Season awareness**: When user says "this season" or "recent good ones", identifies current quarter using Asia/Shanghai timezone; supports explicit quarters like "Summer 2026" or "2026-07"
- **In-plugin update check**: Manually compare with GitHub official Releases in config page; provides ready-to-copy update command when new version is found

## Technical Implementation
- **Language**: TypeScript (Host side `src/*.ts`, built to `lib/host.js`) + JavaScript + React (Client side `src/client.js`, built to `lib/client.js`, includes HLS player)
- **Key dependencies**: cheerio (HTML parsing), hls.js (HLS playback), @deepseek-ai/dsh-tools (tool registration), @deepseek-ai/cordis (plugin injection)
- **Architecture pattern**: Registers `anime-find` plugin ID and default config with host via `cordis.patch.yml`; Host side `apply(ctx, config)` simultaneously injects `tools` (registers `anime_find_search` tool), `webServer` (registers `/anime-find` proxy and cover endpoints), `systemPrompt` (appends segment to constrain Agent calling behavior); Client side renders cards and player in ToolView via `@deepseek-ai/dsh-client-runtime` and `@deepseek-ai/dsh-client-ui-slots`
- **Entry files**: Host entry `lib/client.js` (package.json#exports['.']); Client entry `lib/client.js` (package.json#exports['./client']); build triggered by `prepare` script (`tsc` + resource copy)

## Use Cases
Searching for anime directly in DeepSeek Harness Web conversations without switching browser tabs. Want unified answers for "what's good this season", "where are the magnet links for an anime", and "can I watch online" rather than checking each site individually. Suitable for anime enthusiasts who need regular switching between new season tracking and catching up on older series; limited value for experienced users who only want specific source sites, since this plugin doesn't host any media and users need to verify watchability of rule sites themselves.

## Prerequisites and Compatibility
| Dependency | Minimum Version | Description |
|---|---|---|
| DSH Web | >= 0.1.0-rc.6 | peerDependency declares `@deepseek-ai/dsh-tools` (uses ^0.1.0-rc.6 during development); client needs `@deepseek-ai/dsh-client-runtime` and `@deepseek-ai/dsh-client-ui-slots` |
| Node.js | >= 22 | package.json#engines.node |
| Runtime | — | Host side runs on Node.js, no native modules needed; client browser native ESM + hls.js |
| Platform | Cross-platform | macOS/Windows/Linux all work, runtime only depends on browser and Node |
| Native modules | None | dependencies only cheerio and hls.js; no node-gyp build steps |

## Installation
```bash
dsh plugin --profile web add github:cocofhu/anime-find
```

After installation, restart `dsh web` and force-refresh the page in browser.

## Configuration Options
| Config | Type | Description | Default |
|---|---|---|---|
| Search sources | Multi-select | Enabled sources: Mikan/AniBT/AnimeGarden, default Mikan only | Mikan only |
| Search result limit | Number | Cards per batch; auto minimum 36 when viewing this season | 12 |
| Mikan site URL | URL | Mikan root domain, mirrors supported | https://mikanani.me |
| AniBT site URL | URL | AniBT root domain, mirrors supported | https://anibt.net |
| AnimeGarden API URL | URL | AnimeGarden API endpoint | https://api.animes.garden |
| Upstream request timeout (ms) | Number | Between 3s and 120s | 20000 |
| Request UA | String | User-Agent sent to upstream | Mozilla/5.0 (compatible; anime-find/0.1) |
| Streaming master switch | Toggle | When off, detail card hides "Streaming" Tab | Enabled |
| Streaming rules | JSON array | Statically parseable playback sources, each with at least 8 fields (name, baseURL, searchURL, searchList, searchName, searchResult, chapterRoads, chapterResult); `{{keyword}}` or `{{query}}` replaced with search keyword | Built-in `xfdm` (pilot source) |

Config takes effect immediately upon save, written to `$DSH_HOME/anime-find.json`.

## FAQ

**Q: What should I say in conversation to trigger anime search?**

A: Any anime-related question will cause the Agent to call `anime_find_search` tool and output clickable cards in the reply. Saying "what good anime are there recently", "this season", "any more" will automatically expand based on current quarter (Asia/Shanghai timezone). Saying "search for Mushoku Tensei" searches by title.

**Q: What can I see after clicking a card?**

A: Resource list grouped by subgroup, including episode numbers, magnet links and .torrent file addresses; if the card has a Bangumi ID, details will also pull introduction, rating, genre tags, and up to 5 short reviews, all proxied on Host side and not written to the tool's message body sent to the Agent.

**Q: Can I use the Streaming Tab by default? Do I need to prepare rules myself?**

A: Enabled by default with one built-in pilot rule `xfdm` (static parsing only, no content hosting). If that site is unavailable, you can turn it off in settings or paste custom rule JSON; rules must be statically parseable with at least 8 fields: name/baseURL/searchURL/searchList/searchName/searchResult/chapterRoads/chapterResult.

**Q: Must I restart dsh web after installation?**

A: Yes. After installing/updating a plugin, you need to restart `dsh web` and force-refresh the browser; this is because the HLS player (`hls.min.js`) is explicitly registered by Host and can only be loaded by ToolView after refresh.

**Q: Do I need to restart after changing config? Where is the file saved?**

A: No restart needed, takes effect on save. Config written to `anime-find.json` in Harness user directory (`~/.dsh/anime-find.json` when `$DSH_HOME` unset, `DSH_HOME` takes priority). Version and install source are read-only fields and won't be written to this file.

**Q: What to do if "Player cannot load this episode" appears?**

A: This episode has no playable address parsed or the source site has restrictions. You can switch to other sources in the same tab, or directly open the source site page to watch; when rule parsing is limited, the Streaming Tab will auto-hide but won't affect introduction and resource browsing.

**Q: Will data be sent to the model or uploaded to the cloud?**

A: No. Search requests are sent from the plugin to respective source sites (Mikan/AniBT/AnimeGarden); Bangumi introductions/short reviews are proxied by Host and only rendered to UI, not written to the tool message body sent to the Agent; config file only exists locally.

**Q: How to update to the latest version?**

A: Manually click "Check for Updates" in the plugin settings page under "Version & Updates" section. When a new version is found, follow the prompts to execute `dsh plugin --profile web update anime-find` in terminal, then restart `dsh web` and force-refresh browser; no auto-check, no pre-release/draft Releases used. This command won't show for local `link:` or `file:` installs.

## Learning Curve
Beginner — Use with natural language in conversation, config options have reasonable defaults, can immediately search for anime and view magnet links without writing rules; custom streaming rules require understanding CSS/XPath selectors and JSON field conventions, corresponding to "intermediate" effort.

## Known Issues and Limitations
- Streaming rules in initial release don't support scripts, functions, text matching, or other dynamic XPath predicates; no page JavaScript or WebView interception executed; initial release won't auto-sync community rule repository
- When a single episode cannot play or 0 playable addresses are parsed, it won't fall back to other links for the same episode; detail card will show "Player cannot load this episode" or hide the entire Streaming Tab
- Bangumi short reviews come from `next.bgm.tv/p1` non-public API, may change or go offline; failure only hides the short reviews Tab, doesn't affect introduction and resource browsing
- Single source failure won't interrupt other sources, but plugin won't auto-retry; when AniBT/AnimeGarden are enabled but domains are unreachable, search results will significantly decrease (default Mikan only)
- Pagination results depend on source site returning enough resources; when this season results are few, manually increase result limit or enable other sources in settings
- `dsh plugin update` command only works for GitHub sources; update check still works for local `link:` or `file:` installs, but won't provide copyable update command

---

This document is auto-generated by [deepseek-plugin.org](https://deepseek-plugin.org). HTML page: [anime-find](https://deepseek-plugin.org/plugins/cocofhu/anime-find)
Wiki generated by AI (model: `MiniMax-M2.5`)
