domain-hound 0.1.7 → 0.1.9
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/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -2
- package/README.md +89 -24
- package/clis/domain-check/company-search.mjs +1 -0
- package/clis/domain-check/dossier.mjs +16 -13
- package/clis/domain-check/google-play.mjs +11 -48
- package/clis/domain-check/google-search.mjs +3 -2
- package/clis/domain-check/handles.mjs +235 -106
- package/clis/domain-check/index.mjs +49 -28
- package/clis/domain-check/name-score.mjs +348 -0
- package/clis/domain-check/name-search.mjs +70 -18
- package/clis/domain-check/naming-method.mjs +37 -8
- package/clis/domain-check/price-catalog.mjs +33 -14
- package/clis/domain-check/price-snapshot.json +91 -0
- package/clis/domain-check/prices.mjs +5 -0
- package/clis/domain-check/public-name-checks.mjs +275 -0
- package/clis/domain-check/score-log.mjs +54 -0
- package/clis/domain-check/triage-sources.mjs +4 -1
- package/clis/domain-check/triage.mjs +131 -83
- package/clis/domain-check/youtube-handle.mjs +18 -0
- package/clis/portfolio/checks.mjs +456 -0
- package/clis/portfolio/discover.mjs +175 -0
- package/clis/portfolio/move.mjs +297 -0
- package/clis/portfolio/page.mjs +140 -0
- package/clis/portfolio/portfolio.mjs +212 -0
- package/clis/portfolio/store.mjs +62 -0
- package/clis/portfolio/transfer-prices.mjs +41 -0
- package/clis/spaceship/client.mjs +35 -19
- package/clis/spaceship/tools.mjs +105 -17
- package/clis/spaceship/transfer.mjs +332 -0
- package/display.mjs +62 -61
- package/dossier.mjs +8 -5
- package/hosted-results.mjs +157 -0
- package/hosted.mjs +164 -0
- package/package.json +21 -3
- package/plugin.json +8 -8
- package/results-style.mjs +3 -0
- package/results.mjs +149 -94
- package/server.json +4 -4
- package/server.mjs +216 -28
- package/share.mjs +18 -6
- package/site/r/share-format.mjs +23 -8
- package/skills/naming/SKILL.md +76 -0
- package/watch.mjs +3 -3
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
"plugins": [
|
|
6
6
|
{
|
|
7
7
|
"name": "domain-hound",
|
|
8
|
-
"version": "0.1.
|
|
8
|
+
"version": "0.1.9",
|
|
9
9
|
"source": "./",
|
|
10
|
-
"description": "
|
|
10
|
+
"description": "Domains for agents. One MCP for everything domains: find, check, buy, set up, watch, move, renew, keep track."
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domain-hound",
|
|
3
3
|
"displayName": "Domain Hound",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"description": "
|
|
4
|
+
"version": "0.1.9",
|
|
5
|
+
"description": "Domains for agents. One MCP for everything domains: find, check, buy, set up, watch, move, renew, keep track.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Lars Hvinden"
|
|
8
8
|
},
|
package/README.md
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Domain Hound: Domains for agents
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
One MCP for everything domains: find, check, buy, set up, watch, move, renew, keep track.
|
|
4
|
+
|
|
5
|
+
Domain Hound finds names and checks domain availability, first-year and renewal prices, app names, trademarks and social handles from Claude Code, Codex or any MCP client. Connect your Spaceship account to quote a domain, buy it with your approval and set up DNS. It also investigates and watches taken domains, plans moves to a cheaper registrar, and keeps track of every domain you own. It runs locally.
|
|
6
|
+
|
|
7
|
+
- **Find and check:** `triage_names`, `check_domains`, `naming_method`
|
|
8
|
+
- **Buy and set up:** `quote_domain`, `buy_domain`, `setup_domain`
|
|
9
|
+
- **Watch taken domains:** `taken_domain_dossier`, `watch_domain`
|
|
10
|
+
- **Plan a move:** `move_domain`
|
|
11
|
+
- **Track domains and renewals:** `my_domains`
|
|
4
12
|
|
|
5
13
|

|
|
6
14
|
|
|
@@ -35,43 +43,60 @@ Add this to the client’s MCP configuration for a local stdio server.
|
|
|
35
43
|
}
|
|
36
44
|
```
|
|
37
45
|
|
|
38
|
-
Then ask, for example: “Is lanternbay.com available?”, “Find a name for my meeting-room booking app
|
|
46
|
+
Then ask, for example: “Is lanternbay.com available?”, “Find a name for my meeting-room booking app”, “Is the app name Quiet Otter taken?”, “Buy lanternbay.com and point it at my Vercel site” or “Which of my domains expire soon?”
|
|
47
|
+
|
|
48
|
+
## Find and check
|
|
49
|
+
|
|
50
|
+
The package uses the same hosted search as [domainhound.dev](https://domainhound.dev). `check_domains` compares ten
|
|
51
|
+
endings by default: .com, .ai, .io, .dev, .co, .so, .sh, .inc, .tech and .app. A typed domain checks that exact ending.
|
|
52
|
+
An affordable .inc result appears in a bare-name search only after the registry confirms availability.
|
|
39
53
|
|
|
40
|
-
|
|
54
|
+
Each available domain shows the listed shops, first-year price, renewal and three-year cost, plus the cheapest shop
|
|
55
|
+
over three years. The Hound picks the highest-ranked available ending within $60 over three years when one qualifies.
|
|
56
|
+
The results put exact live US trademark matches first, followed by the domains, App Store, Google Play and public
|
|
57
|
+
handle checks. The package retries unknown public profile and Google Play results from your device. LinkedIn and
|
|
58
|
+
Reddit use the Wayback Machine CDX index, with the latest Common Crawl index as a fallback when Wayback cannot answer.
|
|
59
|
+
A capture includes its year. A successful empty archive search returns `not-seen`. Google Play matches a title or
|
|
60
|
+
a title starting with the name followed by a non-letter, ignoring case. Set `DOMAIN_HOUND_EMBED_CHECKS=off` for search
|
|
61
|
+
or profile links only on TikTok, Instagram, X, Threads, Facebook, LinkedIn, Reddit, Twitch and Google Play.
|
|
62
|
+
The package also tries Apple from your device when the hosted App Store lookup is rate-limited.
|
|
41
63
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- **Meaning:** names that are, contain or sound like a rude word in 14 languages get a note and Check first, never Avoid. Word lists: [LDNOOBW](https://github.com/LDNOOBW/List-of-Dirty-Naughty-Obscene-and-Otherwise-Bad-Words), © Shutterstock, CC BY 4.0, adapted (see `clis/domain-check/meaning-words.LICENSE.txt`).
|
|
46
|
-
- **Apps and rivals:** same-name iOS and Android apps, companies, Wikidata entities and live sites, weighed by their traction.
|
|
47
|
-
- **Handles:** GitHub, npm and Bluesky through their public APIs; YouTube, X, Instagram, TikTok, Facebook, LinkedIn and PyPI as links to check yourself. Each handle reads Taken, No public profile found, or Check yourself.
|
|
64
|
+
Pass `idea` to `triage_names` to generate names on the same service. The results page updates as the checks finish.
|
|
65
|
+
Pass `names` to screen names you already have. For a second generation round, pass the same `idea` with the `wanted`
|
|
66
|
+
and `avoid` names and the next `round` number.
|
|
48
67
|
|
|
49
|
-
|
|
68
|
+
Set `DOMAIN_HOUND_API_URL` to use a different HTTPS API origin or a loopback HTTP origin for development. The package
|
|
69
|
+
uses local registry and price checks if the API is unavailable. Set `DOMAIN_HOUND_LOCAL=1` to choose local checks.
|
|
70
|
+
Local naming uses the naming method to come up with candidates, then checks the supplied names. The local name screen
|
|
71
|
+
can also use EUIPO and Patentstyret credentials and check rival websites.
|
|
50
72
|
|
|
51
|
-
|
|
73
|
+
For a live price quote, use `quote_domain` or explicitly request a shop check. Set `DOMAIN_HOUND_SPACESHIP_KEY` and `DOMAIN_HOUND_SPACESHIP_SECRET` (Spaceship permission `domains:read`), or `DOMAIN_HOUND_DYNADOT_KEY` (a production API key). Dynadot gives its production key account-wide access. Domain Hound only uses it to search. It shows premium pricing when it has a quote and points you to the shop when it has a premium signal without a price.
|
|
52
74
|
|
|
53
75
|
GitHub allows 60 anonymous API requests an hour. To check GitHub handles more often, set `DOMAIN_HOUND_GITHUB_TOKEN` to a token with no scopes; Domain Hound sends it only to `api.github.com`.
|
|
54
76
|
|
|
55
77
|
For the optional browser fallback, run `npm install domain-hound playwright && npx playwright install chromium` in a project directory and start your MCP client there. Ask for a live shop check to set the `confirm` tool flag, or use `--confirm` with the CLI.
|
|
56
78
|
|
|
57
|
-
|
|
79
|
+
### Guides
|
|
58
80
|
|
|
59
81
|
- [Check domain availability](https://domainhound.dev/guides/how-to-check-domain-availability/)
|
|
60
82
|
- [Find an available startup name](https://domainhound.dev/guides/find-an-available-startup-name/)
|
|
61
83
|
- [Check whether an app name is taken](https://domainhound.dev/guides/is-my-app-name-available/)
|
|
62
84
|
|
|
63
|
-
Use `check_domains` for one exact domain or up to 20 names or domains. Use `triage_names` to
|
|
85
|
+
Use `check_domains` for one exact domain or up to 20 names or domains. Use `triage_names` to generate names for an idea or screen names you already have. Ask for `naming_method` to see the naming process.
|
|
64
86
|
|
|
65
|
-
|
|
87
|
+
### Naming skill and Name score
|
|
66
88
|
|
|
67
|
-
|
|
89
|
+
Brainstorm names all day. If they're not available, it's pointless. The naming skill gives your agent one method: subject words, six territories, five recipes (odd pair, pun, blend, insider term, phrase or character), hard bans, and one steering question: "Which two do you love, and which one do you hate?" The Claude Code plugin ships it as `skills/naming/SKILL.md`; any MCP client gets the same method from `naming_method`.
|
|
68
90
|
|
|
69
|
-
|
|
91
|
+
`triage_names` gives each of the first five names a **Name score**, 0 to 100: how clear the road is. It is not a probability. Points come from the best available ending (22), its 3-year price (3), trademarks (25), rivals (20), apps (8), handles (7) and name quality (15). Bans (digits, hyphens, -ly, -ify, -io, AI, GPT, bot, smart, generic words like hub or labs, over 12 letters) and hard filters (no available ending within $60 over 3 years, an identical live trademark in your classes, a strong same-name rival in your subject, a severe bad meaning) run first, in code; those names get no score and are never a pick. A check that failed counts 40% of its points and says "Not checked". Trademarks stay at 20 of 25 until the EU office answers. A failed US trademark or rival check keeps the total at 79 or less, and so does missing `candidates` evidence for the bans code cannot judge on its own. Bands: 80+ Strong, 60 to 79 Workable, 40 to 59 Risky, under 40 Advise against. Picks rank by score. Each scored name shows up to three reasons. The hosted generator includes its own Name score in each suggestion. A local bare-name lookup can also provide a preliminary score.
|
|
70
92
|
|
|
71
|
-
|
|
93
|
+
Set `DOMAIN_HOUND_SCORE_LOG=1` to keep a local calibration log in `~/.domain-hound/score-log.jsonl`: component points, weights version, rank, and whether the person explicitly picked a shown name. Once they choose, the agent can record it with `check_domains`, using the exact domain and `picked: true`. It is off by default, never leaves your machine, and holds no names unless you also set `DOMAIN_HOUND_SCORE_LOG_NAMES=1`.
|
|
72
94
|
|
|
73
|
-
|
|
74
|
-
|
|
95
|
+
Completed lookups save an HTML page and a Markdown copy in `~/.domain-hound/results/`. The page lists prices, availability and sources for each ending checked. On macOS, naming and batch results open in the background. Windows and Wayland request a background open where the desktop supports it. Exact checks and watch results stay in chat with a file link. Set `DOMAIN_HOUND_OPEN=off` on the MCP server to keep every page closed.
|
|
96
|
+
|
|
97
|
+
### Share
|
|
98
|
+
|
|
99
|
+
Use **Share** on the results page to send up to five names. The link carries the names, checked endings, verdicts, prices, the Name score and how many checks were not done, and the check time after the `#`. Score reasons and evidence stay local. The browser reads that part locally. Your brief and notes stay out of the link. Anyone with the full link can read the shortlist.
|
|
75
100
|
|
|
76
101
|
## Buy and set up
|
|
77
102
|
|
|
@@ -108,14 +133,50 @@ To find the contact ID, use Spaceship's `contacts_list` or read `contacts.regist
|
|
|
108
133
|
|
|
109
134
|
**Last resort: checkout.** After a valid quote, the answer ends with a Spaceship checkout link, for when Spaceship's MCP cannot be used and nothing was submitted. Check the same term, price limits, privacy and auto-renew before you pay, then ask Domain Hound to verify and set up the domain. After an unclear order there is no checkout link: check your Spaceship account first.
|
|
110
135
|
|
|
111
|
-
|
|
136
|
+
## Watch taken domains
|
|
137
|
+
|
|
138
|
+
- `taken_domain_dossier` checks the registry record, website and public Atom listings. It shows sources, up to three priced alternatives with a quick name screen, and an inquiry draft when useful. Other marketplaces have manual links. The draft stays in the result.
|
|
139
|
+
- `watch_domain` checks the registry, expiry and website. To start a free watch, give your assistant the email it should use. Confirm the watch in your inbox. Optional news requires a separate choice in that confirmation.
|
|
140
|
+
|
|
141
|
+
## Move a domain to a cheaper shop
|
|
142
|
+
|
|
143
|
+
`move_domain` plans a transfer for any exact domain you own. It reads the same public registry facts and dated list prices as `my_domains` and saves nothing to your list. The plan shows:
|
|
144
|
+
|
|
145
|
+
- the current registrar and its renewal price (a price is "unavailable" when no list price can be trusted)
|
|
146
|
+
- the transfer price at each shop and the total for 3 years. The total adds what the transfer covers (one year for most endings, two for .ai) and the renewals for the remaining years, counted per year
|
|
147
|
+
- the target: Spaceship when it is the cheapest or within $2 a year of the cheapest, otherwise the cheapest shop
|
|
148
|
+
- what blocks a move now: a registration or registry transfer event under 60 days old (gTLDs and .io), a registry lock or pending status, an expiry under 15 days or an expired domain
|
|
149
|
+
- the rules for the ending (ICANN's Transfer Policy, and the .ai and .io terms) and the steps at the current registrar to unlock the domain and get the auth code. Steps link to the official guides for GoDaddy, Namecheap, Squarespace, Cloudflare, Porkbun, Dynadot, Hover, Gandi and IONOS
|
|
150
|
+
|
|
151
|
+
The plan reads a transfer date only from the registry's own `transfer` event, never from the last-changed date.
|
|
152
|
+
|
|
153
|
+
With a Spaceship key (`domains:read`), the plan adds a live transfer quote from Spaceship's pricing API. It is bound to your account, the domain, the current registrar and expiry, the term Spaceship adds, the amount, the regular price (shown when a promotion applies), the renewal and the currency. The quote expires in 10 minutes. `move_domain` with `quote_id` and `max_usd` checks all of that again, plus the blockers, `max_usd` and `DOMAIN_HOUND_MAX_USD`, and stops on any change.
|
|
154
|
+
|
|
155
|
+
**Default: Spaceship's transfer checkout.** Spaceship's MCP ([tool reference](https://www.spaceship.com/knowledgebase/spaceship-mcp/)) has no tool for transfers into Spaceship, and `domain_register` only registers new names. So the answer links to Spaceship's transfer page with the limits to check. You enter the auth code there; it never passes through the chat. If Spaceship's MCP later offers a transfer tool with a preview and a confirmation step, your agent may use it with the same limits.
|
|
156
|
+
|
|
157
|
+
**Opt-in: direct transfer.** This uses the same `DOMAIN_HOUND_DIRECT_PURCHASE=1` and `DOMAIN_HOUND_SPACESHIP_CONTACT_ID` as direct purchase. The key also needs `domains:billing`, `domains:transfer` and `asyncoperations:read`. Preview with a dry run. After your approval, `confirm: true` with the auth code from your private tool input sends one request. It enables high privacy and auto-renew and uses your owner contact for each role. Direct execution requires a standard price, a verified transfer term, an unlocked domain and no pending transfer. Both the promotional and regular upfront prices must fit both limits. Spaceship has no API field for a hard charge limit and sets the final charge. Domain Hound uses the code for the request and omits it from output and local state. A documented refusal releases the local claim. An unclear result keeps the claim and blocks a repeat. `move_domain` with `status: true` follows the transfer without a code.
|
|
158
|
+
|
|
159
|
+
Quotes, transfer quotes, DNS plans, order and transfer claims and receipts stay in `~/.domain-hound/purchases/`. `DOMAIN_HOUND_PURCHASE_DIR` moves them; a relative path is resolved once, when the server starts.
|
|
160
|
+
|
|
161
|
+
## Keep track of your domains
|
|
162
|
+
|
|
163
|
+
`my_domains` gives one view of every domain you own, wherever you bought it, most urgent first: registrar, expiry and days left, registry status, DNS host, website, certificate, email setup (MX, SPF, DMARC), renewal price and any 3-year saving from moving.
|
|
164
|
+
|
|
165
|
+
- Name the domains you own to check them and save them to a local list of up to 100. Ask again without naming any to recheck the saved list, or ask to remove some.
|
|
166
|
+
- Ask it to find your domains. It lists candidates from a fixed set of public project files (such as `CNAME`, `package.json`, `vercel.json`, `netlify.toml`, Wrangler config and the README) and, with a Spaceship key (`domains:read`), the domains in your Spaceship account. It never opens `.env` or other secret files. Nothing is saved until you confirm which domains are yours.
|
|
167
|
+
- It flags expiry within 30 days, registry and service issues, and potential transfer savings. Renew at your registrar, or use `move_domain` to see how much registration time a transfer adds. The portfolio can also suggest an expiry watch by email.
|
|
168
|
+
|
|
169
|
+
`my_domains` buys, transfers and sends nothing, and stores nothing remotely. Its checks use public registry records, DNS, your sites over HTTPS and HTTP, and dated list prices. The list stays on this computer in `~/.domain-hound/portfolio.json` (`DOMAIN_HOUND_PORTFOLIO_FILE` moves it). The results page is rewritten on each check as `portfolio.html` and `portfolio.md` in the results folder.
|
|
112
170
|
|
|
113
171
|
## Privacy and lookup hosts
|
|
114
172
|
|
|
115
|
-
|
|
173
|
+
Hosted checks send the name or domain to Domain Hound. A hosted naming round sends its idea and steering words to
|
|
174
|
+
Domain Hound and Cloudflare Workers AI. Set `DOMAIN_HOUND_LOCAL=1` for local lookups. Local lookups share candidates
|
|
175
|
+
with public evidence sources. Catalog downloads carry no candidate name. Clicking a results link sends the name in that link.
|
|
116
176
|
|
|
117
177
|
| Host or service | What the lookup sends |
|
|
118
178
|
| --- | --- |
|
|
179
|
+
| `domainhound-mcp.domainhound.workers.dev` | The name or domain, or the idea and steering words for generation. Shop credentials and approval tokens stay on your device during hosted checks. |
|
|
119
180
|
| `data.iana.org`; `whois.iana.org` | RDAP routing table request with no name; WHOIS referral request with only the ending. |
|
|
120
181
|
| The DNS resolvers configured on your device, authoritative DNS servers, and the registry’s RDAP or WHOIS host. RDAP routes come from IANA or use `rdap.registry.co`, `rdap.identitydigital.services`, `rdap.norid.no` and `rdap.nic.so`. WHOIS for .ai, .io and .me goes to `whois.nic.ai`, `whois.nic.io` and `whois.nic.me`. | Candidate or rival domain. A DNS routing query can contain just an ending or a nameserver hostname. Registry referrals and redirects can select another registry host. |
|
|
121
182
|
| Candidate website and public hosts it redirects to | The domain in a homepage request; an onward request can include a URL provided by that website. |
|
|
@@ -123,13 +184,17 @@ Domain Hound uses your brief locally. Availability queries use registries and DN
|
|
|
123
184
|
| `api.euipo.europa.eu` and `euipo.europa.eu` (sandbox: `api-sandbox.euipo.europa.eu` and `auth-sandbox.euipo.europa.eu`) | With EUIPO credentials, the token host gets the client ID and secret. The search host gets the client ID, access token and candidate spellings. |
|
|
124
185
|
| `api.patentstyret.no` | With a subscription key, the Norwegian office gets the key and candidate spellings. |
|
|
125
186
|
| `mcp.atom.com` | The taken domain for an exact listing lookup. The buyer's ceiling stays local. |
|
|
126
|
-
| `itunes.apple.com
|
|
187
|
+
| `itunes.apple.com` | Candidate name for US App Store search. |
|
|
188
|
+
| `www.tiktok.com`, `graph.facebook.com`, `publish.twitter.com` / `publish.x.com`, `www.threads.net` / `www.threads.com`, `www.youtube.com`, `www.twitch.tv` | The candidate's handle. |
|
|
189
|
+
| `web.archive.org`, `index.commoncrawl.org` | Candidate LinkedIn company or Reddit profile URL for the public archive search. |
|
|
190
|
+
| `play.google.com` | Candidate name for Google Play app search. |
|
|
191
|
+
| `www.googleapis.com` | The candidate's YouTube handle and optional local `YOUTUBE_API_KEY` when the key is configured. |
|
|
127
192
|
| `www.wikidata.org`, `www.google.com`, `trends.google.com`, `data.brreg.no` | Candidate name; Wikidata also gets entity or class IDs for matches. |
|
|
128
193
|
| `api.github.com`, `registry.npmjs.org`, `public.api.bsky.app` | Candidate name or handle, handle variants and public controls. With a GitHub token configured, it goes only to GitHub. |
|
|
129
194
|
| `www.sec.gov`, `tranco-list.eu` | Public company and site lists with no candidate name. |
|
|
130
195
|
| `index.commoncrawl.org` | Rival domain for a public crawl count. The index list request has no name. |
|
|
131
196
|
| `api.porkbun.com`, `www.dynadot.com`, `www.gandi.net` | Public price catalogs, sometimes filtered by ending. The standalone exact-price CLI may also ask `data.norges-bank.no` for USD/NOK with no name. |
|
|
132
|
-
| `spaceship.dev`, `api.dynadot.com`; `api.porkbun.com` for the standalone exact-price CLI | With configured credentials, the selected domain and the relevant shop credentials.
|
|
197
|
+
| `spaceship.dev`, `api.dynadot.com`; `api.porkbun.com` for the standalone exact-price CLI | With configured credentials, the selected domain and the relevant shop credentials. Spaceship also gets quote and purchase details, the owner contact ID on a direct order, DNS records for approved setup, or the auth code and owner contact ID for an approved direct transfer. Portfolio discovery uses the Spaceship domain list endpoint. |
|
|
133
198
|
| `mcp.spaceship.com` | When you use Spaceship's own MCP, your assistant passes the domain and the registration options to Spaceship. |
|
|
134
199
|
| `www.spaceship.com`, `www.namecheap.com`, `www.dynadot.com`, `www.cloudflare.com` | Optional live browser check sends only the selected domain. Storefront pages can load supporting assets. A manual Spaceship price refresh opens its public catalog without a candidate name. |
|
|
135
200
|
| `api.search.brave.com` or `google.serper.dev` | Candidate search when you configure a search provider. |
|
|
@@ -49,6 +49,7 @@ export async function searchNorwegianCompanies(name, input, options) {
|
|
|
49
49
|
const match = companyMatch(letters(name), row.navn);
|
|
50
50
|
if (match) matches.set(row.organisasjonsnummer, {
|
|
51
51
|
name: compactText(row.navn, 65), match, url: 'https://virksomhet.brreg.no/nb/oppslag/enheter/' + row.organisasjonsnummer,
|
|
52
|
+
...(typeof row.hjemmeside === 'string' && { homepage: compactText(row.hjemmeside, 253) }),
|
|
52
53
|
...(Number.isSafeInteger(row.antallAnsatte) && row.antallAnsatte > 0 && { employees: row.antallAnsatte }),
|
|
53
54
|
});
|
|
54
55
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
// bought, no shop credentials are used, and no background refresh starts. Every part shares one total deadline.
|
|
5
5
|
import { classifyComSite } from './com-site.mjs';
|
|
6
6
|
import { anySignal, cacheDir, readCache } from './cache.mjs';
|
|
7
|
-
import { asciiDomain, canRecommend, defaultEndings, domainEnding,
|
|
8
|
-
|
|
7
|
+
import { asciiDomain, canRecommend, choosePick, defaultEndings, domainEnding, listQuote, nameCandidates, premiumRisk, qualityEndings,
|
|
8
|
+
searchCandidates, supportedEndings, unicodeName } from './name-search.mjs';
|
|
9
9
|
import { bundledCatalog, loadCachedCatalog } from './price-catalog.mjs';
|
|
10
|
-
import {
|
|
10
|
+
import { triageNames } from './triage.mjs';
|
|
11
11
|
import { bootstrap, bootstrapUrl, documentedWhois, lookupRegistrations, rdapBase, rdapDomainUrl, systemResolveNs } from './registry.mjs';
|
|
12
12
|
import { saleMarketplace } from './parking.mjs';
|
|
13
13
|
import { checkListings, marketplaceFor, providers, stopReason, urlBindsDomain } from './marketplaces.mjs';
|
|
@@ -20,6 +20,7 @@ const label = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/;
|
|
|
20
20
|
const registrarPriceUrls = {
|
|
21
21
|
Spaceship: 'https://www.spaceship.com/domain-search/pricing/',
|
|
22
22
|
Dynadot: 'https://www.dynadot.com/domain/prices?currency=USD',
|
|
23
|
+
Cloudflare: 'https://pricing.registrar.cloudflare.com/',
|
|
23
24
|
};
|
|
24
25
|
const priceSourceUrl = (quote, tld) => quote.shop === 'Gandi'
|
|
25
26
|
? 'https://www.gandi.net/en/domain/tld/' + encodeURIComponent(tld) + '?currency=USD'
|
|
@@ -50,6 +51,9 @@ export function readRdap(data, domain) {
|
|
|
50
51
|
if (String(data?.ldhName ?? '').toLowerCase().replace(/\.$/, '') !== domain) return null;
|
|
51
52
|
const events = Array.isArray(data.events) ? data.events : [];
|
|
52
53
|
const event = action => iso(events.find(row => row?.eventAction === action)?.eventDate);
|
|
54
|
+
// Multiple transfers can appear. Canonical ISO timestamps sort with the newest first.
|
|
55
|
+
const transferred = events.filter(row => row?.eventAction === 'transfer').map(row => iso(row.eventDate))
|
|
56
|
+
.reduce((latest, date) => date && (!latest || date > latest) ? date : latest, null);
|
|
53
57
|
const registrar = (Array.isArray(data.entities) ? data.entities : [])
|
|
54
58
|
.find(entity => Array.isArray(entity?.roles) && entity.roles.includes('registrar'));
|
|
55
59
|
const card = Array.isArray(registrar?.vcardArray?.[1]) ? registrar.vcardArray[1] : [];
|
|
@@ -57,7 +61,8 @@ export function readRdap(data, domain) {
|
|
|
57
61
|
const ianaId = (Array.isArray(registrar?.publicIds) ? registrar.publicIds : [])
|
|
58
62
|
.find(row => /iana/i.test(String(row?.type)))?.identifier;
|
|
59
63
|
return {
|
|
60
|
-
|
|
64
|
+
// "transfer" is its own RDAP event action (RFC 9083); "last changed" is never read as a transfer.
|
|
65
|
+
created: event('registration'), expires: event('expiration'), changed: event('last changed'), transferred,
|
|
61
66
|
registrar: name, registrarIanaId: /^\d{1,6}$/.test(String(ianaId ?? '')) ? String(ianaId) : null,
|
|
62
67
|
status: (Array.isArray(data.status) ? data.status : [])
|
|
63
68
|
.filter(value => typeof value === 'string' && /^[a-z ]{3,40}$/i.test(value)).map(normalizeStatus).slice(0, 24),
|
|
@@ -116,7 +121,7 @@ export async function registryFacts(domain, { fetcher = globalThis.fetch, resolv
|
|
|
116
121
|
registered, checkedAt, source,
|
|
117
122
|
created: facts.created ?? null,
|
|
118
123
|
expires: facts.expires ?? iso(basic?.expires) ?? null,
|
|
119
|
-
changed: facts.changed ?? null,
|
|
124
|
+
changed: facts.changed ?? null, transferred: facts.transferred ?? null,
|
|
120
125
|
registrar: facts.registrar ?? null, registrarIanaId: facts.registrarIanaId ?? null,
|
|
121
126
|
status: facts.status ?? [], nameservers,
|
|
122
127
|
marketplaceNameservers: saleMarketplace(nameservers),
|
|
@@ -304,10 +309,8 @@ export function chooseTrack(registry, listing, outlook) {
|
|
|
304
309
|
return 'not-listed';
|
|
305
310
|
}
|
|
306
311
|
|
|
307
|
-
// Broker ending order: the
|
|
308
|
-
|
|
309
|
-
// endings follow in catalog order.
|
|
310
|
-
const brokerEndingOrder = [...new Set([...mainstreamEndings, ...fallbackEndings, ...supportedEndings])];
|
|
312
|
+
// Broker ending order: the shared quality order, then other supported endings in catalog order.
|
|
313
|
+
const brokerEndingOrder = [...new Set([...qualityEndings, ...supportedEndings])];
|
|
311
314
|
const labelOf = domain => domain.slice(0, domain.indexOf('.'));
|
|
312
315
|
const threeYearOf = row => Number.isFinite(row?.threeYear) ? row.threeYear : Infinity;
|
|
313
316
|
|
|
@@ -338,8 +341,9 @@ function variantForms(name) {
|
|
|
338
341
|
});
|
|
339
342
|
}
|
|
340
343
|
|
|
341
|
-
//
|
|
342
|
-
//
|
|
344
|
+
// The shared pick for the exact name (highest-quality ending within $60 over 3 years, else the least paid over 3 years,
|
|
345
|
+
// never .ai by default), a natural .com variant, and the strongest remaining exact ending.
|
|
346
|
+
// Fill open slots in the quality order, then with additional variants.
|
|
343
347
|
export function pickAlternatives(rows, domain) {
|
|
344
348
|
const name = labelOf(domain);
|
|
345
349
|
const forms = variantForms(name);
|
|
@@ -354,8 +358,7 @@ export function pickAlternatives(rows, domain) {
|
|
|
354
358
|
const picks = [];
|
|
355
359
|
const open = list => list.filter(row => !picks.some(pick => pick.row === row));
|
|
356
360
|
const take = (row, role) => { if (row && open([row]).length) picks.push({ row, role }); };
|
|
357
|
-
|
|
358
|
-
take(bestValue(attractive) ?? bestValue(exact), 'best-value');
|
|
361
|
+
take(choosePick(exact.map(row => ({ domain: row.domain, now: row.firstPayment ?? null, total: row.threeYear ?? null, row })))?.row, 'pick');
|
|
359
362
|
take(variants[0], 'variant');
|
|
360
363
|
for (const row of [...open(exact), ...open(variants)]) {
|
|
361
364
|
if (picks.length >= 3) break;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { cacheDir, mapLimit, readCache, writeCache } from './cache.mjs';
|
|
2
2
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
3
3
|
import { withShopPages } from './confirm.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { compactText, day, request } from './triage-sources.mjs';
|
|
5
5
|
|
|
6
|
+
import { parsePlayCards, playSearchLink, playTitleMatches } from './public-name-checks.mjs';
|
|
7
|
+
|
|
8
|
+
export { parsePlayCards, playSearchLink };
|
|
6
9
|
const origin = 'https://play.google.com';
|
|
7
10
|
const maxHtmlBytes = 4_000_000;
|
|
8
11
|
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
+
export const googlePlayLabel = 'Google Play has no public search';
|
|
13
|
+
export const googlePlayLinkLabel = 'Search Google Play';
|
|
12
14
|
|
|
13
15
|
export function readPlayCards(query) {
|
|
14
16
|
// Google's featured and compact cards have different markup.
|
|
@@ -44,45 +46,6 @@ export function readPlayDetails(html, url) {
|
|
|
44
46
|
return { ratings: null, ...seller };
|
|
45
47
|
}
|
|
46
48
|
|
|
47
|
-
// Server-rendered fallback for installs without Chromium. It mirrors readPlayCards on a parse5 tree.
|
|
48
|
-
export function parsePlayCards(document, query) {
|
|
49
|
-
const nodes = [];
|
|
50
|
-
const walk = node => {
|
|
51
|
-
for (const child of node.childNodes ?? []) {
|
|
52
|
-
if (child.tagName) nodes.push(child);
|
|
53
|
-
walk(child);
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
walk(document);
|
|
57
|
-
const attribute = (node, name) => node.attrs.find(attr => attr.name === name)?.value;
|
|
58
|
-
const hasClass = (node, name) => (attribute(node, 'class') ?? '').split(/\s+/).includes(name);
|
|
59
|
-
const text = node => node.nodeName === '#text' ? node.value : (node.childNodes ?? []).map(text).join('');
|
|
60
|
-
const find = (node, name) => {
|
|
61
|
-
for (const child of node.childNodes ?? []) {
|
|
62
|
-
if (child.tagName && hasClass(child, name)) return child;
|
|
63
|
-
const found = child.tagName && find(child, name);
|
|
64
|
-
if (found) return found;
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
67
|
-
};
|
|
68
|
-
const clean = value => value.replace(/\s+/g, ' ').trim();
|
|
69
|
-
const emptyMessage = clean('No results for ' + query).toLowerCase();
|
|
70
|
-
if (nodes.some(node => ['h1', 'h2', 'h3', 'span', 'p'].includes(node.tagName) &&
|
|
71
|
-
clean(text(node)).toLowerCase() === emptyMessage)) return [];
|
|
72
|
-
const rows = nodes.flatMap(link => {
|
|
73
|
-
const href = link.tagName === 'a' ? attribute(link, 'href') : null;
|
|
74
|
-
if (!href?.startsWith('/store/apps/details?id=')) return [];
|
|
75
|
-
const featured = hasClass(link, 'Qfxief');
|
|
76
|
-
const nameNode = featured ? null : find(link, 'DdYX5');
|
|
77
|
-
const name = featured ? attribute(link, 'aria-label') : nameNode && text(nameNode);
|
|
78
|
-
const sellerNode = featured ? link.parentNode?.tagName && find(link.parentNode, 'LbQbAe') : find(link, 'wMUdtb');
|
|
79
|
-
const seller = sellerNode ? text(sellerNode) : null;
|
|
80
|
-
const id = new URL(href, origin).searchParams.get('id');
|
|
81
|
-
return name && seller && id ? [{ name, seller, id }] : [];
|
|
82
|
-
});
|
|
83
|
-
return rows.length ? rows : null;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
49
|
async function readBounded(response) {
|
|
87
50
|
if (!response.ok || Number(response.headers?.get('content-length')) > maxHtmlBytes || !response.body) {
|
|
88
51
|
await response.body?.cancel().catch(() => {});
|
|
@@ -129,12 +92,12 @@ function browserSource(page) {
|
|
|
129
92
|
};
|
|
130
93
|
}
|
|
131
94
|
|
|
132
|
-
async function lookUp(source,
|
|
95
|
+
async function lookUp(source, input, deadline) {
|
|
133
96
|
const remaining = () => Math.max(1, Math.floor(deadline - performance.now()));
|
|
134
97
|
const rows = await source.search(input, remaining);
|
|
135
98
|
if (rows === null) return null;
|
|
136
99
|
const matches = rows.flatMap(row => {
|
|
137
|
-
if (!/^[A-Za-z0-9_]+(?:\.[A-Za-z0-9_]+)+$/.test(row.id) || !
|
|
100
|
+
if (!/^[A-Za-z0-9_]+(?:\.[A-Za-z0-9_]+)+$/.test(row.id) || !playTitleMatches(input, row.name)) return [];
|
|
138
101
|
return [{ name: compactText(row.name, 70), seller: compactText(row.seller, 70),
|
|
139
102
|
url: origin + '/store/apps/details?id=' + row.id }];
|
|
140
103
|
});
|
|
@@ -161,7 +124,7 @@ export async function searchAndroidApps(names, options = {}) {
|
|
|
161
124
|
const filename = 'triage-play-' + name + '.json';
|
|
162
125
|
const prior = await readCache(directory, filename);
|
|
163
126
|
const age = now.getTime() - prior?.at;
|
|
164
|
-
if (age >= 0 && age < cacheLifetime && Array.isArray(prior.apps) && prior.apps.every(app => Object.hasOwn(app, 'ratings'))
|
|
127
|
+
if (age >= 0 && age < cacheLifetime && prior.version === 3 && Array.isArray(prior.apps) && prior.apps.every(app => Object.hasOwn(app, 'ratings'))) {
|
|
165
128
|
answered(name, prior.apps);
|
|
166
129
|
return null;
|
|
167
130
|
}
|
|
@@ -176,10 +139,10 @@ export async function searchAndroidApps(names, options = {}) {
|
|
|
176
139
|
let source;
|
|
177
140
|
try {
|
|
178
141
|
source = await useSource();
|
|
179
|
-
const apps = await lookUp(source,
|
|
142
|
+
const apps = await lookUp(source, input, Math.min(deadline, performance.now() + 8000));
|
|
180
143
|
if (apps === null || performance.now() >= deadline) continue;
|
|
181
144
|
answered(name, apps);
|
|
182
|
-
await writeCache(directory, filename, { at: now.getTime(), apps, version:
|
|
145
|
+
await writeCache(directory, filename, { at: now.getTime(), apps, version: 3 }).catch(() => {});
|
|
183
146
|
return;
|
|
184
147
|
} catch { /* An unavailable search gives no evidence about the name. */ }
|
|
185
148
|
finally { await source?.close?.(); }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, open } from 'node:fs/promises';
|
|
2
2
|
import { setTimeout as delay } from 'node:timers/promises';
|
|
3
3
|
import { cacheDir, readCache, writeCache } from './cache.mjs';
|
|
4
|
-
import { playSearchLink } from './google-play.mjs';
|
|
4
|
+
import { googlePlayLabel, googlePlayLinkLabel, playSearchLink } from './google-play.mjs';
|
|
5
5
|
import { compactText, day, letters, request } from './triage-sources.mjs';
|
|
6
6
|
|
|
7
7
|
const sharedCache = new URL('google/', cacheDir);
|
|
@@ -233,7 +233,8 @@ export function nameCheckLines(row) {
|
|
|
233
233
|
return [
|
|
234
234
|
{ label: 'Google', text: googleText(row?.google), link: googleSearchLink(input) },
|
|
235
235
|
{ label: 'App Store (iOS)', text: appText(competition.AppStore), link: appStoreSearchLink(input) },
|
|
236
|
-
{ label: 'Google Play (Android)', text:
|
|
236
|
+
{ label: 'Google Play (Android)', text: competition.GooglePlay == null ? googlePlayLabel : appText(competition.GooglePlay),
|
|
237
|
+
link: playSearchLink(input), ...(competition.GooglePlay == null && { linkLabel: googlePlayLinkLabel }) },
|
|
237
238
|
];
|
|
238
239
|
}
|
|
239
240
|
|