Bundle
dsh-namecheck
软件/品牌取名查重插件:.com 域名注册状态(RDAP 权威数据)+ 商标近似筛查(可配置三方商标 API)
- Source
- HULILI-com
- License
- MIT
- Updated
- Updated 6 days ago
Readme
# dsh-namecheck
[English](README.md) | [中文](README.zh.md)
A dsh (DeepSeek Harness) plugin that checks the availability of candidate software/brand names. It registers a `check_name_availability` tool; when the agent detects a naming/validation intent in conversation, the tool runs automatically and returns domain registration status and trademark screening results in a single call.
## Features
- **Domain check**: backed by Verisign / RDAP registry data — authoritative, free, no API key required; checks `.com` by default and supports additional TLDs via the `tlds` argument
- **Trademark screening** with two data sources:
- Third-party trademark search API (paid / open platform) for precise matches
- Bing heuristic web search as a fallback when no API is configured (screening only — it is **not** a trademark examination conclusion; manual review is required)
- **Zero third-party runtime dependencies**: uses only Node.js native `fetch`, and the core logic can be tested standalone
## How it works
The tool performs two checks:
1. **Domain**: queries RDAP for the registration status of `<name>.<tld>`. A `404` response means the domain is available; `200` means it is registered, and the result includes registrant and registration/expiration metadata.
2. **Trademark**: if a third-party trademark API is configured, it returns precise search results. Otherwise, it runs a heuristic web search and reports potential same-name brand conflicts as a preliminary screening signal.
## Install
From GitHub:
```bash
dsh plugin --profile web add github:HULILI-com/dsh-namecheck
```
From npm (once published):
```bash
dsh plugin --profile web add dsh-namecheck
```
Local development (link mode):
```bash
dsh plugin --profile web add link:/path/to/dsh-namecheck
```
Restart dsh (`dsh --profile web`) after installation and hard-refresh the browser page.
## Usage
Ask the agent in a dsh conversation, for example:
> Please check whether these candidate names are available: acme, demo, novalink, and report the `.com` domain status and trademark screening result for each.
The agent calls the `check_name_availability` tool and returns a structured result: per-candidate domain status, trademark search/screening outcome, and an overall verdict.
Tool arguments:
| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | Candidate English name / pinyin |
| `chineseName` | string | No | Candidate Chinese name, used for trademark screening |
| `tlds` | string[] | No | Domain suffixes to check, defaults to `["com"]` |
## Configuration
Override plugin config in the profile's user layer (`cordis.patch.yml`):
```yaml
- insert:
- id: dsh-namecheck
name: 'dsh-namecheck'
config:
trademarkApiUrl: https://api.example-trademark.com
trademarkApiKey: '<your-token>'
```
| Config | Description | Default |
| --- | --- | --- |
| `trademarkApiUrl` | Base URL of the third-party trademark search API | empty |
| `trademarkApiKey` | Bearer token for the trademark API | empty |
Request contract for the trademark API (adjust in `lib/checks.js` to match your vendor's docs):
```
GET {trademarkApiUrl}/search?keyword=<name>&type=all
Authorization: Bearer <trademarkApiKey>
```
Response contract:
```json
{
"hits": [
{ "name": "acme", "class": 9, "status": "registered", "applicant": "Example Co." }
]
}
```
## Project structure
```
dsh-namecheck/
├── package.json # Package manifest; dsh.bundle.patch points to cordis.patch.yml
├── cordis.patch.yml # Mounts the plugin into the profile config tree
├── index.js # Plugin entry: exports name + apply(ctx, config); registers the tool
├── lib/checks.js # Core logic (RDAP domain check + trademark screening), zero deps
├── test-check.js # Standalone test script; no dsh/pnpm environment required
├── README.md # English documentation (default)
├── README.zh.md # Chinese documentation
└── LICENSE
```
## Local testing
The core logic can be verified without starting dsh:
```bash
node test-check.js example demo
```
## Known limitations
- **Domain**: results follow official RDAP registry data; domains that are registered but parked or listed at a premium are still reported as “registered”.
- **Trademark**: no free open API is available from the national trademark office or public query sites in China. Without a third-party API, the plugin only returns a heuristic screening result, which **cannot replace a trademark examination**. For production use, confirm via a paid/open data source or official channels.
- **Version**: dsh is in developer preview, and plugin APIs may change across versions. If the plugin stops working after a dsh upgrade, inspect the plugin tree with `dsh --profile web --dump-config`.
## License
MIT
Install
dsh plugin --profile web add github:HULILI-com/dsh-namecheck
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-namecheck from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.