domain-hound 0.1.15 → 0.1.16

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.
@@ -4,7 +4,7 @@
4
4
  "plugins": [
5
5
  {
6
6
  "name": "domain-hound",
7
- "version": "0.1.15",
7
+ "version": "0.1.16",
8
8
  "source": { "source": "local", "path": "./" },
9
9
  "policy": { "installation": "AVAILABLE", "authentication": "ON_INSTALL" },
10
10
  "category": "Productivity"
@@ -5,7 +5,7 @@
5
5
  "plugins": [
6
6
  {
7
7
  "name": "domain-hound",
8
- "version": "0.1.15",
8
+ "version": "0.1.16",
9
9
  "source": "./",
10
10
  "description": "Domains for agents. One MCP for everything domains: find, check, buy, set up, watch, move, renew, keep track.",
11
11
  "relevance": { "topic": "Domains", "signals": { "hosts": ["rdap.org", "porkbun.com"] } }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "domain-hound",
3
3
  "displayName": "Domain Hound",
4
- "version": "0.1.15",
4
+ "version": "0.1.16",
5
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"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domain-hound",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Domains for agents. One MCP for everything domains: find, check, buy, set up, watch, move, renew, keep track.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "domain-hound",
4
- "version": "0.1.15",
4
+ "version": "0.1.16",
5
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"
package/server.json CHANGED
@@ -4,12 +4,12 @@
4
4
  "title": "Domain Hound: Domains for agents",
5
5
  "description": "One MCP for everything domains: find, check, buy, set up, watch, move, renew, keep track",
6
6
  "websiteUrl": "https://domainhound.dev",
7
- "version": "0.1.15",
7
+ "version": "0.1.16",
8
8
  "packages": [
9
9
  {
10
10
  "registryType": "npm",
11
11
  "identifier": "domain-hound",
12
- "version": "0.1.15",
12
+ "version": "0.1.16",
13
13
  "transport": {
14
14
  "type": "stdio"
15
15
  }
package/server.mjs CHANGED
@@ -64,9 +64,9 @@ const lookupProperties = {
64
64
  };
65
65
  const searchAnnotations = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true };
66
66
  const batchResultMeta = { 'anthropic/maxResultSizeChars': 40_000 };
67
- const showAnswer = 'Show the answer as given; offer details only if the user asks.';
68
- const detailSchema = { type: 'string', enum: ['short', 'full'],
69
- description: 'Choose how much to show, e.g. "full" for all shops and handles.' };
67
+ const showAnswer = 'Show the tool’s text answer as given. Offer details only if the user asks.';
68
+ const detailSchema = { type: 'string', enum: ['short', 'full'], default: 'short',
69
+ description: 'Defaults to "short". Use "full" for all shops and handles.' };
70
70
  const serverInstructions = 'Use Domain Hound for domains and product, company or app names, including availability, registration and renewal prices, trademarks, buying and watches. '
71
71
  + 'Start with check_domains for availability or prices, triage_names for naming or trademark screening, and watch_domain for a release watch. '
72
72
  + showAnswer + ' Include the clickable Results page link whenever one is returned. '
@@ -201,7 +201,7 @@ function compactCheckResult(result) {
201
201
 
202
202
  function lookupResult(page, args, triage = false) {
203
203
  const result = toolResult(JSON.stringify(page));
204
- if (args.detail === 'full' || args.additionalHandles?.length) {
204
+ if (args.detail === 'full') {
205
205
  const alternatives = triage ? [] : (page.checks ?? []).flatMap(check => {
206
206
  const options = check.query.exactDomain && check[alternativeEndings];
207
207
  return options ? checkLines({ ...options, domains: options.domains.filter(row => row.domain !== check.query.exactDomain) },
@@ -211,8 +211,11 @@ function lookupResult(page, args, triage = false) {
211
211
  return result;
212
212
  }
213
213
  const link = page.resultPage && resultsLine(page.resultPage).replace(/^Results page:/, 'All prices, shops and handles:');
214
- if (!page.checks && page.pending && page.names?.length) {
215
- const progressRows = (triage ? page.names.slice(0, 5) : page.names).map(({ name, free, taken, premium }) => {
214
+ const local = page[shortPresentation];
215
+ const checks = page.checks ?? local;
216
+ if (!checks && page.pending) {
217
+ const names = page.names ?? [];
218
+ const progressRows = (triage ? names.slice(0, 5) : names).map(({ name, free, taken, premium }) => {
216
219
  const show = values => values.map(value => {
217
220
  const ending = value.d ?? value;
218
221
  return ending === name ? ending : '.' + ending;
@@ -230,14 +233,14 @@ function lookupResult(page, args, triage = false) {
230
233
  args.purchase && !triage ? 'This check leaves checkout to you.' : '', link].filter(Boolean).join('\n');
231
234
  return result;
232
235
  }
233
- if (!page.resultPage) return result;
234
- const local = page[shortPresentation];
235
- const checks = page.checks ?? local;
236
- if (!checks) return result;
236
+ if (!triage && !checks?.length) {
237
+ result.content[0].text = ['No domain results to show.', link].filter(Boolean).join('\n');
238
+ return result;
239
+ }
237
240
 
238
- const options = { pending: Boolean(page.generation && page.pending), link };
241
+ const options = { pending: Boolean(page.pending), link };
239
242
  const short = triage
240
- ? shortIdeaAnswer(visibleChecks(checks, args, page.generation), options)
243
+ ? shortIdeaAnswer(visibleChecks(checks ?? [], args, page.generation), options)
241
244
  : checks.map(check => shortDomainAnswer({ ...check, alternatives: check[alternativeEndings] }, {
242
245
  ...options, link: checks.length === 1 ? link : undefined,
243
246
  })).join('\n\n');
@@ -248,7 +251,7 @@ function lookupResult(page, args, triage = false) {
248
251
  const text = triage ? short : [
249
252
  short.replace(/^[^\n]+/, first => [first, ...notes].join(' ')),
250
253
  ...(checks.length !== 1 ? [link] : []),
251
- ].join('\n');
254
+ ].filter(Boolean).join('\n');
252
255
  return { ...result, content: [{ type: 'text', text }] };
253
256
  }
254
257
 
@@ -609,7 +612,7 @@ export async function serve({
609
612
 
610
613
  // Join the running or finished lookup for the same input, or start one. Answer within the budget with the
611
614
  // result, or with the progress so far while the lookup keeps running for a repeated call to collect.
612
- async function runLookup(args, buildArgs, rowsFor, render, renderProgress, onLookup = () => {}, started = performance.now(), legacy = false) {
615
+ async function runLookup(args, buildArgs, rowsFor, render, renderProgress, onLookup = () => {}, started = performance.now()) {
613
616
  let cliArgs;
614
617
  let rows;
615
618
  try {
@@ -640,7 +643,7 @@ export async function serve({
640
643
  try {
641
644
  const snapshot = await renderProgress(lookup.progress, {
642
645
  rows, elapsedMs: performance.now() - lookup.started, budgetMs: timeout }, lookup);
643
- return legacy ? toolResult(snapshot) : lookupResult(JSON.parse(snapshot), args, buildArgs === triageArguments);
646
+ return lookupResult(JSON.parse(snapshot), args, buildArgs === triageArguments);
644
647
  } catch {
645
648
  return errorResult('Domain Hound could not format the progress.');
646
649
  }
@@ -651,7 +654,7 @@ export async function serve({
651
654
  }
652
655
  try {
653
656
  const page = await render(lookup.outcome.data, lookup);
654
- return legacy ? toolResult(JSON.stringify(page)) : lookupResult(page, args, buildArgs === triageArguments);
657
+ return lookupResult(page, args, buildArgs === triageArguments);
655
658
  } catch {
656
659
  return errorResult('Domain Hound could not format the result.');
657
660
  }
@@ -662,7 +665,7 @@ export async function serve({
662
665
  return tracked;
663
666
  };
664
667
 
665
- async function hostedLookup(args, triage, started, streamDomains = false) {
668
+ async function hostedLookup(args, triage, started, { streamDomains = !triage } = {}) {
666
669
  if (!hosted || args?.confirm === true || (triage && args?.additionalHandles?.length)) return null;
667
670
  let rows;
668
671
  try {
@@ -729,14 +732,14 @@ export async function serve({
729
732
  if (page) return lookupResult(page, args);
730
733
  }
731
734
  hostedDebug('Hosted check exceeded the tool response budget; it is still running.');
732
- const result = toolResult(JSON.stringify({ display: attributed('The hosted check is still running. Call the same tool again with the same input to collect it.'),
733
- complete: false, pending: true }));
734
- if (detail !== 'full' && (triage || streamDomains)) result.content[0].text = 'Still checking ' + (triage ? 'names and domains.' : 'domains.');
735
- return result;
735
+ return lookupResult({
736
+ display: attributed('The hosted check is still running. Call the same tool again with the same input to collect it.'),
737
+ complete: false, pending: true,
738
+ }, args, triage);
736
739
  }
737
740
  const page = lookup.finished ? lookup.result : await lookup.first;
738
741
  if (!page || page.isError) return page;
739
- return triage || streamDomains ? lookupResult(page, args, triage) : toolResult(JSON.stringify(page));
742
+ return lookupResult(page, args, triage);
740
743
  }
741
744
 
742
745
  async function renderHostedLookup(checks, args, triage, { pending = false, reuse } = {}) {
@@ -763,9 +766,12 @@ export async function serve({
763
766
  } catch (problem) {
764
767
  return errorResult(problem.message);
765
768
  }
766
- const local = () => toolResult(JSON.stringify({ display: attributed(
767
- 'Use this naming method, then send your candidates to triage_names with names and shortlist: true.\n\n'
768
- + namingRecipe(input.idea)), source: 'local' }));
769
+ const local = () => toolResult(JSON.stringify({
770
+ display: attributed(args.detail === 'full'
771
+ ? 'Use this naming method, then send your candidates to triage_names with names and shortlist: true.\n\n' + namingRecipe(input.idea)
772
+ : 'Name generation is unavailable. Use naming_guide, then send your candidates to triage_names.'),
773
+ source: 'local',
774
+ }));
769
775
  if (!hosted) return local();
770
776
  const key = JSON.stringify(input);
771
777
  let job = generations.get(key);
@@ -1038,14 +1044,15 @@ export async function serve({
1038
1044
  if (name !== checkTool.name && name !== 'broker_find') return error(id, -32602, 'Unknown tool');
1039
1045
  // An exact lookup includes the purchase line while its registration status is unsettled.
1040
1046
  const exact = isObject(args) && typeof args.query === 'string' && args.query.includes('.');
1041
- const result = await hostedLookup(args, false, started, name === checkTool.name) ?? await runLookup(
1047
+ const legacy = name === 'broker_find';
1048
+ const result = await hostedLookup(args, false, started, { streamDomains: !legacy }) ?? await runLookup(
1042
1049
  args, cliArguments, checkRows, data => pages({ ...data, source: 'local' }, args).then(page => withCheckQuoteOffer(page, args)),
1043
- (progress, timing) => localProgress(progressText(progress, { ...timing, purchase: purchase || exact })), undefined, started, name !== checkTool.name,
1050
+ (progress, timing) => localProgress(progressText(progress, { ...timing, purchase: purchase || exact })), undefined, started,
1044
1051
  );
1045
1052
  if (exact && args.picked === true && !result.isError && result.structuredContent?.resultPage) {
1046
1053
  track(scoreLog?.picked(args.query, 'check_domains'));
1047
1054
  }
1048
- return reply(name === checkTool.name ? compactCheckResult(result) : result);
1055
+ return reply(legacy ? result : compactCheckResult(result));
1049
1056
  }
1050
1057
 
1051
1058
  const lines = createInterface({ input, terminal: false, crlfDelay: Infinity });