@llmindset/hf-mcp 0.1.17 → 0.1.19

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.
Files changed (36) hide show
  1. package/dist/docs-search/doc-fetch.d.ts +24 -0
  2. package/dist/docs-search/doc-fetch.d.ts.map +1 -0
  3. package/dist/docs-search/doc-fetch.js +53 -0
  4. package/dist/docs-search/doc-fetch.js.map +1 -0
  5. package/dist/docs-search/doc-fetch.test.d.ts +2 -0
  6. package/dist/docs-search/doc-fetch.test.d.ts.map +1 -0
  7. package/dist/docs-search/doc-fetch.test.js +52 -0
  8. package/dist/docs-search/doc-fetch.test.js.map +1 -0
  9. package/dist/docs-search/doc-mappings.d.ts +7 -0
  10. package/dist/docs-search/doc-mappings.d.ts.map +1 -0
  11. package/dist/docs-search/doc-mappings.js +75 -0
  12. package/dist/docs-search/doc-mappings.js.map +1 -0
  13. package/dist/docs-search/docs-semantic-search.d.ts +41 -0
  14. package/dist/docs-search/docs-semantic-search.d.ts.map +1 -0
  15. package/dist/docs-search/docs-semantic-search.js +162 -0
  16. package/dist/docs-search/docs-semantic-search.js.map +1 -0
  17. package/dist/docs-search/docs-semantic-search.test.d.ts +2 -0
  18. package/dist/docs-search/docs-semantic-search.test.d.ts.map +1 -0
  19. package/dist/docs-search/docs-semantic-search.test.js +283 -0
  20. package/dist/docs-search/docs-semantic-search.test.js.map +1 -0
  21. package/dist/index.d.ts +2 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +2 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/tool-ids.d.ts +6 -4
  26. package/dist/tool-ids.d.ts.map +1 -1
  27. package/dist/tool-ids.js +7 -16
  28. package/dist/tool-ids.js.map +1 -1
  29. package/package.json +2 -2
  30. package/src/docs-search/doc-fetch.test.ts +74 -0
  31. package/src/docs-search/doc-fetch.ts +92 -0
  32. package/src/docs-search/doc-mappings.ts +79 -0
  33. package/src/docs-search/docs-semantic-search.test.ts +365 -0
  34. package/src/docs-search/docs-semantic-search.ts +244 -0
  35. package/src/index.ts +2 -0
  36. package/src/tool-ids.ts +9 -18
@@ -0,0 +1,24 @@
1
+ import { z } from 'zod';
2
+ export declare const DOC_FETCH_CONFIG: {
3
+ readonly name: "hf_doc_fetch";
4
+ readonly description: "Fetch a document from the Hugging Face documentation library.";
5
+ readonly schema: z.ZodObject<{
6
+ doc_url: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ doc_url: string;
9
+ }, {
10
+ doc_url: string;
11
+ }>;
12
+ readonly annotations: {
13
+ readonly title: "Fetch a document from the Hugging Face library";
14
+ readonly destructiveHint: false;
15
+ readonly readOnlyHint: true;
16
+ readonly openWorldHint: true;
17
+ };
18
+ };
19
+ export type DocFetchParams = z.infer<typeof DOC_FETCH_CONFIG.schema>;
20
+ export declare class DocFetchTool {
21
+ processUrl(hfUrl: string): string;
22
+ fetch(url: string): Promise<string>;
23
+ }
24
+ //# sourceMappingURL=doc-fetch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-fetch.d.ts","sourceRoot":"","sources":["../../src/docs-search/doc-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;CAgBnB,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAkBrE,qBAAa,YAAY;IAIxB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAgC3B,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAgBzC"}
@@ -0,0 +1,53 @@
1
+ import { z } from 'zod';
2
+ import { DOC_MAPPINGS } from './doc-mappings.js';
3
+ export const DOC_FETCH_CONFIG = {
4
+ name: 'hf_doc_fetch',
5
+ description: 'Fetch a document from the Hugging Face documentation library.',
6
+ schema: z.object({
7
+ doc_url: z
8
+ .string()
9
+ .min(28, 'Url should start with https://huggingface.co/docs/')
10
+ .max(200, 'Query too long')
11
+ .describe('Hugging Face documentation URL'),
12
+ }),
13
+ annotations: {
14
+ title: 'Fetch a document from the Hugging Face library',
15
+ destructiveHint: false,
16
+ readOnlyHint: true,
17
+ openWorldHint: true,
18
+ },
19
+ };
20
+ export class DocFetchTool {
21
+ processUrl(hfUrl) {
22
+ if (!hfUrl.startsWith('https://huggingface.co/docs/')) {
23
+ throw new Error('That was not a valid Hugging Face document URL');
24
+ }
25
+ const urlPath = hfUrl.replace('https://huggingface.co/docs/', '').split('#')[0] || '';
26
+ const parts = urlPath.split('/');
27
+ const packageName = parts[0] || '';
28
+ let fetchUrl = hfUrl;
29
+ const mapping = DOC_MAPPINGS[packageName];
30
+ if (mapping) {
31
+ const remainingPath = parts.slice(1).join('/');
32
+ const filePath = remainingPath ? `${remainingPath}.md` : 'index.md';
33
+ const githubUrl = `https://raw.githubusercontent.com/${mapping.repo_id}/refs/heads/main/${mapping.doc_folder}/${filePath}`;
34
+ fetchUrl = githubUrl;
35
+ }
36
+ return fetchUrl;
37
+ }
38
+ async fetch(url) {
39
+ try {
40
+ const githubUrl = this.processUrl(url);
41
+ const response = await fetch(githubUrl);
42
+ if (!response.ok) {
43
+ throw new Error(`Failed to fetch document: ${response.status} ${response.statusText}`);
44
+ }
45
+ const content = await response.text();
46
+ return content;
47
+ }
48
+ catch (error) {
49
+ throw new Error(`Failed to fetch document: ${error instanceof Error ? error.message : 'Unknown error'}`);
50
+ }
51
+ }
52
+ }
53
+ //# sourceMappingURL=doc-fetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-fetch.js","sourceRoot":"","sources":["../../src/docs-search/doc-fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,C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qCAAqC,OAAO,CAAC,OAAO,oBAAoB,OAAO,CAAC,UAAU,IAAI,QAAQ,EAAE,CAAC;YAC3H,QAAQ,GAAG,SAAS,CAAC;QACtB,CAAC;QAGD,OAAO,QAAQ,CAAC;IACjB,CAAC;IAKD,KAAK,CAAC,KAAK,CAAC,GAAW;QACtB,IAAI,CAAC;YACJ,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;YAEvC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,CAAC;YAExC,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,6BAA6B,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YACxF,CAAC;YAED,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACtC,OAAO,OAAO,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,6BAA6B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QAC1G,CAAC;IACF,CAAC;CACD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=doc-fetch.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-fetch.test.d.ts","sourceRoot":"","sources":["../../src/docs-search/doc-fetch.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,52 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { DocFetchTool } from './doc-fetch.js';
3
+ describe('DocFetchTool', () => {
4
+ const tool = new DocFetchTool();
5
+ describe('URL conversion', () => {
6
+ it('should convert basic HF docs URL to GitHub URL', () => {
7
+ const hfUrl = 'https://huggingface.co/docs/dataset-viewer/index';
8
+ const expectedUrl = 'https://raw.githubusercontent.com/huggingface/dataset-viewer/refs/heads/main/docs/source/index.md';
9
+ const result = tool.processUrl(hfUrl);
10
+ expect(result).toBe(expectedUrl);
11
+ });
12
+ it('should handle URLs with fragments by removing them', () => {
13
+ const hfUrl = 'https://huggingface.co/docs/huggingface_hub/guides/upload#faster-uploads';
14
+ const expectedUrl = 'https://raw.githubusercontent.com/huggingface/huggingface_hub/refs/heads/main/docs/source/en/guides/upload.md';
15
+ const result = tool.processUrl(hfUrl);
16
+ expect(result).toBe(expectedUrl);
17
+ });
18
+ it('should handle transformers documentation', () => {
19
+ const hfUrl = 'https://huggingface.co/docs/transformers/model_doc/bert';
20
+ const expectedUrl = 'https://raw.githubusercontent.com/huggingface/transformers/refs/heads/main/docs/source/en/model_doc/bert.md';
21
+ const result = tool.processUrl(hfUrl);
22
+ expect(result).toBe(expectedUrl);
23
+ });
24
+ it('should handle diffusers documentation', () => {
25
+ const hfUrl = 'https://huggingface.co/docs/diffusers/api/pipelines/stable_diffusion';
26
+ const expectedUrl = 'https://raw.githubusercontent.com/huggingface/diffusers/refs/heads/main/docs/source/en/api/pipelines/stable_diffusion.md';
27
+ const result = tool.processUrl(hfUrl);
28
+ expect(result).toBe(expectedUrl);
29
+ });
30
+ it('should handle timm documentation with custom package name', () => {
31
+ const hfUrl = 'https://huggingface.co/docs/timm/models';
32
+ const expectedUrl = 'https://raw.githubusercontent.com/huggingface/pytorch-image-models/refs/heads/main/hfdocs/source/models.md';
33
+ const result = tool.processUrl(hfUrl);
34
+ expect(result).toBe(expectedUrl);
35
+ });
36
+ it('should default to index.md when no path is provided', () => {
37
+ const hfUrl = 'https://huggingface.co/docs/transformers';
38
+ const expectedUrl = 'https://raw.githubusercontent.com/huggingface/transformers/refs/heads/main/docs/source/en/index.md';
39
+ const result = tool.processUrl(hfUrl);
40
+ expect(result).toBe(expectedUrl);
41
+ });
42
+ it('should throw error for URLs not starting with correct prefix', () => {
43
+ const invalidUrl = 'https://example.com/docs/something';
44
+ expect(() => tool.processUrl(invalidUrl)).toThrow('That was not a valid Hugging Face document URL');
45
+ });
46
+ it('should throw error for unknown package names', () => {
47
+ const unknownPackageUrl = 'https://huggingface.co/docs/unknown-package/guide';
48
+ expect(tool.processUrl(unknownPackageUrl)).toBe('https://huggingface.co/docs/unknown-package/guide');
49
+ });
50
+ });
51
+ });
52
+ //# sourceMappingURL=doc-fetch.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-fetch.test.js","sourceRoot":"","sources":["../../src/docs-search/doc-fetch.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC7B,MAAM,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;IAEhC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;QAC/B,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACzD,MAAM,KAAK,GAAG,kDAAkD,CAAC;YACjE,MAAM,WAAW,GAChB,mGAAmG,CAAC;YAErG,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACtC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE;YAC7D,MAAM,KAAK,GAAG,0EAA0E,CAAC;YACzF,MAAM,WAAW,GAChB,+GAA+G,CAAC;YAEjH,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;YACtC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,0CAA0C,EAAE,GAAG,EAAE;YACnD,MAAM,KAAK,GAAG,yDAAyD,CA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CAAC;QACrG,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;YACvD,MAAM,iBAAiB,GAAG,mDAAmD,CAAC;YAE9E,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,IAAI,CAAC,mDAAmD,CAAC,CAAC;QACtG,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ interface DocMapping {
2
+ repo_id: string;
3
+ doc_folder: string;
4
+ }
5
+ export declare const DOC_MAPPINGS: Record<string, DocMapping>;
6
+ export {};
7
+ //# sourceMappingURL=doc-mappings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-mappings.d.ts","sourceRoot":"","sources":["../../src/docs-search/doc-mappings.ts"],"names":[],"mappings":"AAAA,UAAU,UAAU;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAyEnD,CAAC"}
@@ -0,0 +1,75 @@
1
+ export const DOC_MAPPINGS = {
2
+ 'tokenizers': {
3
+ repo_id: 'huggingface/tokenizers',
4
+ doc_folder: 'docs/source-doc-builder'
5
+ },
6
+ 'diffusers': {
7
+ repo_id: 'huggingface/diffusers',
8
+ doc_folder: 'docs/source/en'
9
+ },
10
+ 'accelerate': {
11
+ repo_id: 'huggingface/accelerate',
12
+ doc_folder: 'docs/source'
13
+ },
14
+ 'huggingface_hub': {
15
+ repo_id: 'huggingface/huggingface_hub',
16
+ doc_folder: 'docs/source/en'
17
+ },
18
+ 'transformers': {
19
+ repo_id: 'huggingface/transformers',
20
+ doc_folder: 'docs/source/en'
21
+ },
22
+ 'hub': {
23
+ repo_id: 'huggingface/hub-docs',
24
+ doc_folder: 'docs/hub'
25
+ },
26
+ 'huggingface.js': {
27
+ repo_id: 'huggingface/huggingface.js',
28
+ doc_folder: 'docs'
29
+ },
30
+ 'transformers.js': {
31
+ repo_id: 'huggingface/transformers.js',
32
+ doc_folder: 'docs/source'
33
+ },
34
+ 'smolagents': {
35
+ repo_id: 'huggingface/smolagents',
36
+ doc_folder: 'docs/source/en'
37
+ },
38
+ 'peft': {
39
+ repo_id: 'huggingface/peft',
40
+ doc_folder: 'docs/source'
41
+ },
42
+ 'trl': {
43
+ repo_id: 'huggingface/trl',
44
+ doc_folder: 'docs/source'
45
+ },
46
+ 'bitsandbytes': {
47
+ repo_id: 'bitsandbytes-foundation/bitsandbytes',
48
+ doc_folder: 'docs/source'
49
+ },
50
+ 'lerobot': {
51
+ repo_id: 'huggingface/lerobot',
52
+ doc_folder: 'docs/source'
53
+ },
54
+ 'timm': {
55
+ repo_id: 'huggingface/pytorch-image-models',
56
+ doc_folder: 'hfdocs/source'
57
+ },
58
+ 'inference-providers': {
59
+ repo_id: 'huggingface/hub-docs',
60
+ doc_folder: 'docs/inference-providers'
61
+ },
62
+ 'safetensors': {
63
+ repo_id: 'huggingface/safetensors',
64
+ doc_folder: 'docs/source'
65
+ },
66
+ 'inference-endpoints': {
67
+ repo_id: 'huggingface/hf-endpoints-documentation',
68
+ doc_folder: 'docs/source'
69
+ },
70
+ 'dataset-viewer': {
71
+ repo_id: 'huggingface/dataset-viewer',
72
+ doc_folder: 'docs/source'
73
+ }
74
+ };
75
+ //# sourceMappingURL=doc-mappings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"doc-mappings.js","sourceRoot":"","sources":["../../src/docs-search/doc-mappings.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,YAAY,GAA+B;IACtD,YAAY,EAAE;QACZ,OAAO,EAAE,wBAAwB;QACjC,UAAU,EAAE,yBAAyB;KACtC;IACD,WAAW,EAAE;QACX,OAAO,EAAE,uBAAuB;QAChC,UAAU,EAAE,gBAAgB;KAC7B;IACD,YAAY,EAAE;QACZ,OAAO,EAAE,wBAA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fApiCall } from '../hf-api-call.js';
3
+ export declare const DOCS_SEMANTIC_SEARCH_CONFIG: {
4
+ readonly name: "hf_doc_search";
5
+ readonly description: "Search the Hugging Face documentation library. Returns excerpts grouped by Product and Document.";
6
+ readonly schema: z.ZodObject<{
7
+ query: z.ZodString;
8
+ product: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ query: string;
11
+ product?: string | undefined;
12
+ }, {
13
+ query: string;
14
+ product?: string | undefined;
15
+ }>;
16
+ readonly annotations: {
17
+ readonly title: "Hugging Face Documentation Library Search";
18
+ readonly destructiveHint: false;
19
+ readonly readOnlyHint: true;
20
+ readonly openWorldHint: true;
21
+ };
22
+ };
23
+ export type DocSearchParams = z.infer<typeof DOCS_SEMANTIC_SEARCH_CONFIG.schema>;
24
+ interface DocSearchResult {
25
+ text: string;
26
+ product: string;
27
+ heading1: string;
28
+ source_page_url: string;
29
+ source_page_title: string;
30
+ heading2?: string;
31
+ }
32
+ interface DocSearchApiParams {
33
+ q: string;
34
+ product?: string;
35
+ }
36
+ export declare class DocSearchTool extends HfApiCall<DocSearchApiParams, DocSearchResult[]> {
37
+ constructor(hfToken?: string, apiUrl?: string);
38
+ search(params: DocSearchParams): Promise<string>;
39
+ }
40
+ export {};
41
+ //# sourceMappingURL=docs-semantic-search.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-semantic-search.d.ts","sourceRoot":"","sources":["../../src/docs-search/docs-semantic-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;CAsB9B,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,MAAM,CAAC,CAAC;AAEjF,UAAU,eAAe;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,kBAAkB;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAKD,qBAAa,aAAc,SAAQ,SAAS,CAAC,kBAAkB,EAAE,eAAe,EAAE,CAAC;gBAKtE,OAAO,CAAC,EAAE,MAAM,EAAE,MAAM,SAAkC;IAQhE,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC;CAyBtD"}
@@ -0,0 +1,162 @@
1
+ import { z } from 'zod';
2
+ import { HfApiCall } from '../hf-api-call.js';
3
+ import { escapeMarkdown } from '../utilities.js';
4
+ import { DOC_FETCH_CONFIG } from './doc-fetch.js';
5
+ export const DOCS_SEMANTIC_SEARCH_CONFIG = {
6
+ name: 'hf_doc_search',
7
+ description: 'Search the Hugging Face documentation library. Returns excerpts grouped by Product and Document.',
8
+ schema: z.object({
9
+ query: z
10
+ .string()
11
+ .min(3, 'Supply at least one search term')
12
+ .max(200, 'Query too long')
13
+ .describe('Semantic search query'),
14
+ product: z
15
+ .string()
16
+ .optional()
17
+ .describe('Filter by Product (e.g., "hub", "dataset-viewer", "transformers"). Supply when known for focused results'),
18
+ }),
19
+ annotations: {
20
+ title: 'Hugging Face Documentation Library Search',
21
+ destructiveHint: false,
22
+ readOnlyHint: true,
23
+ openWorldHint: true,
24
+ },
25
+ };
26
+ export class DocSearchTool extends HfApiCall {
27
+ constructor(hfToken, apiUrl = 'https://hf.co/api/docs/search') {
28
+ super(apiUrl, hfToken);
29
+ }
30
+ async search(params) {
31
+ try {
32
+ if (!params.query)
33
+ return 'No query provided';
34
+ const apiParams = { q: params.query.toLowerCase() };
35
+ if (params.product) {
36
+ apiParams.product = params.product;
37
+ }
38
+ const results = await this.callApi(apiParams);
39
+ if (results.length === 0) {
40
+ return params.product
41
+ ? `No documentation found for query '${params.query}' in product '${params.product}'`
42
+ : `No documentation found for query '${params.query}'`;
43
+ }
44
+ return formatSearchResults(params.query, results, params.product);
45
+ }
46
+ catch (error) {
47
+ if (error instanceof Error) {
48
+ throw new Error(`Failed to search documentation: ${error.message}`);
49
+ }
50
+ throw error;
51
+ }
52
+ }
53
+ }
54
+ function groupResults(results) {
55
+ const grouped = new Map();
56
+ for (const result of results) {
57
+ if (!grouped.has(result.product)) {
58
+ grouped.set(result.product, new Map());
59
+ }
60
+ const productGroup = grouped.get(result.product);
61
+ if (!productGroup)
62
+ continue;
63
+ const baseUrl = result.source_page_url.split('#')[0] || result.source_page_url;
64
+ if (!productGroup.has(baseUrl)) {
65
+ productGroup.set(baseUrl, []);
66
+ }
67
+ const pageResults = productGroup.get(baseUrl);
68
+ if (pageResults) {
69
+ pageResults.push(result);
70
+ }
71
+ }
72
+ return grouped;
73
+ }
74
+ function groupBySection(pageResults) {
75
+ const sectionGroups = new Map();
76
+ for (const result of pageResults) {
77
+ const section = result.heading2;
78
+ if (!sectionGroups.has(section)) {
79
+ sectionGroups.set(section, []);
80
+ }
81
+ const sectionResults = sectionGroups.get(section);
82
+ if (sectionResults) {
83
+ sectionResults.push(result);
84
+ }
85
+ }
86
+ return sectionGroups;
87
+ }
88
+ function formatSectionExcerpts(section, results) {
89
+ const lines = [];
90
+ if (section) {
91
+ if (results.length > 1) {
92
+ lines.push(`#### Excerpts from the "${escapeMarkdown(section)}" section`);
93
+ }
94
+ else {
95
+ lines.push(`#### Excerpt from the "${escapeMarkdown(section)}" section`);
96
+ }
97
+ lines.push('');
98
+ }
99
+ for (const result of results) {
100
+ const cleanText = result.text
101
+ .replace(/<[^>]*>/g, '')
102
+ .replace(/\n\s*\n/g, '\n')
103
+ .trim();
104
+ lines.push(cleanText);
105
+ lines.push('');
106
+ }
107
+ return lines.join('\n');
108
+ }
109
+ function formatSearchResults(query, results, productFilter) {
110
+ const lines = [];
111
+ const filterText = productFilter ? ` (filtered by product: ${productFilter})` : '';
112
+ lines.push(`# Documentation Library Search Results for "${escapeMarkdown(query)}"${filterText}`);
113
+ lines.push('');
114
+ lines.push(`Found ${results.length} results`);
115
+ lines.push('');
116
+ const grouped = groupResults(results);
117
+ const sortedProducts = Array.from(grouped.keys()).sort((a, b) => {
118
+ const productGroupA = grouped.get(a);
119
+ const productGroupB = grouped.get(b);
120
+ if (!productGroupA || !productGroupB)
121
+ return 0;
122
+ const countA = Array.from(productGroupA.values()).reduce((sum, arr) => sum + arr.length, 0);
123
+ const countB = Array.from(productGroupB.values()).reduce((sum, arr) => sum + arr.length, 0);
124
+ return countB - countA;
125
+ });
126
+ for (const product of sortedProducts) {
127
+ const productGroup = grouped.get(product);
128
+ if (!productGroup)
129
+ continue;
130
+ const totalProductHits = Array.from(productGroup.values()).reduce((sum, arr) => sum + arr.length, 0);
131
+ lines.push(`## Results for Product: ${escapeMarkdown(product)} (${totalProductHits} results)`);
132
+ lines.push('');
133
+ const sortedUrls = Array.from(productGroup.keys()).sort((a, b) => {
134
+ const pageResultsA = productGroup.get(a);
135
+ const pageResultsB = productGroup.get(b);
136
+ if (!pageResultsA || !pageResultsB)
137
+ return 0;
138
+ return pageResultsB.length - pageResultsA.length;
139
+ });
140
+ for (const url of sortedUrls) {
141
+ const pageResults = productGroup.get(url);
142
+ if (!pageResults || pageResults.length === 0)
143
+ continue;
144
+ const firstResult = pageResults[0];
145
+ if (!firstResult)
146
+ continue;
147
+ const pageTitle = firstResult.heading1 || firstResult.source_page_title;
148
+ const hitCount = pageResults.length > 1 ? ` (${pageResults.length} results)` : '';
149
+ lines.push(`### Results from [${escapeMarkdown(pageTitle)}](${url})${hitCount}`);
150
+ lines.push('');
151
+ const sectionGroups = groupBySection(pageResults);
152
+ for (const [section, sectionResults] of sectionGroups) {
153
+ lines.push(formatSectionExcerpts(section, sectionResults));
154
+ }
155
+ }
156
+ }
157
+ lines.push('---');
158
+ lines.push('');
159
+ lines.push(`Use the "${DOC_FETCH_CONFIG.name}" tool to fetch a document from the library.`);
160
+ return lines.join('\n');
161
+ }
162
+ //# sourceMappingURL=docs-semantic-search.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-semantic-search.js","sourceRoot":"","sources":["../../src/docs-search/docs-semantic-search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,2BAA2B,GAAG;IAC1C,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,kGAAkG;IAC/G,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QAChB,KAAK,EAAE,CAAC;aACN,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC;aACzC,GAAG,CAAC,GAAG,EAAE,gBAAgB,CAAC;aAC1B,QAAQ,CAAC,uBAAuB,CAAC;QACnC,OAAO,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACR,0GAA0G,CAC1G;KACF,CAAC;IACF,WAAW,EAAE;QACZ,KAAK,EAAE,2CAA2C;QAClD,eAAe,EAAE,KAAK;QACtB,YAAY,EAAE,IAAI;QAClB,aAAa,EAAE,IAAI;KACnB;CACQ,CAAC;AAqBX,MAAM,OAAO,aAAc,SAAQ,SAAgD;IAKlF,YAAY,OAAgB,EAAE,MAAM,GAAG,+BAA+B;QACrE,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxB,CAAC;IAMD,KAAK,CAAC,MAAM,CAAC,MAAuB;QACnC,IAAI,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,KAAK;gBAAE,OAAO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CAAC,KAAK,CAAC,CAAC;IAClB,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,YAAY,gBAAgB,CAAC,IAAI,8CAA8C,CAAC,CAAC;IAE5F,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=docs-semantic-search.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"docs-semantic-search.test.d.ts","sourceRoot":"","sources":["../../src/docs-search/docs-semantic-search.test.ts"],"names":[],"mappings":""}