@cosmocoder/mcp-web-docs 2.0.21 → 2.0.23

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 (89) hide show
  1. package/build/__mocks__/embeddings.d.ts +0 -4
  2. package/build/__mocks__/embeddings.js +0 -9
  3. package/build/__mocks__/embeddings.js.map +1 -1
  4. package/build/config.d.ts +0 -2
  5. package/build/config.js +0 -40
  6. package/build/config.js.map +1 -1
  7. package/build/config.test.js +1 -36
  8. package/build/config.test.js.map +1 -1
  9. package/build/crawler/auth.d.ts +0 -17
  10. package/build/crawler/auth.js +1 -40
  11. package/build/crawler/auth.js.map +1 -1
  12. package/build/crawler/auth.test.js +4 -22
  13. package/build/crawler/auth.test.js.map +1 -1
  14. package/build/crawler/base.d.ts +0 -13
  15. package/build/crawler/base.js +4 -116
  16. package/build/crawler/base.js.map +1 -1
  17. package/build/crawler/base.test.js +2 -172
  18. package/build/crawler/base.test.js.map +1 -1
  19. package/build/crawler/content-utils.d.ts +0 -1
  20. package/build/crawler/content-utils.js +0 -8
  21. package/build/crawler/content-utils.js.map +1 -1
  22. package/build/crawler/content-utils.test.js +1 -41
  23. package/build/crawler/content-utils.test.js.map +1 -1
  24. package/build/crawler/crawlee-crawler.d.ts +2 -21
  25. package/build/crawler/crawlee-crawler.js +0 -1
  26. package/build/crawler/crawlee-crawler.js.map +1 -1
  27. package/build/crawler/crawlee-crawler.test.js +13 -0
  28. package/build/crawler/crawlee-crawler.test.js.map +1 -1
  29. package/build/crawler/docs-crawler.d.ts +3 -4
  30. package/build/crawler/docs-crawler.js +3 -5
  31. package/build/crawler/docs-crawler.js.map +1 -1
  32. package/build/crawler/docs-crawler.test.js +3 -9
  33. package/build/crawler/docs-crawler.test.js.map +1 -1
  34. package/build/crawler/github.d.ts +1 -1
  35. package/build/crawler/github.js +7 -7
  36. package/build/crawler/github.js.map +1 -1
  37. package/build/crawler/github.test.js +8 -19
  38. package/build/crawler/github.test.js.map +1 -1
  39. package/build/crawler/llms-txt.js +5 -3
  40. package/build/crawler/llms-txt.js.map +1 -1
  41. package/build/crawler/llms-txt.test.js +2 -0
  42. package/build/crawler/llms-txt.test.js.map +1 -1
  43. package/build/crawler/site-rules.js +6 -4
  44. package/build/crawler/site-rules.js.map +1 -1
  45. package/build/index.js +7 -1687
  46. package/build/index.js.map +1 -1
  47. package/build/index.test.js +124 -422
  48. package/build/index.test.js.map +1 -1
  49. package/build/indexing/queue-manager.js +3 -2
  50. package/build/indexing/queue-manager.js.map +1 -1
  51. package/build/indexing/status.d.ts +0 -5
  52. package/build/indexing/status.js +1 -26
  53. package/build/indexing/status.js.map +1 -1
  54. package/build/indexing/status.test.js +0 -24
  55. package/build/indexing/status.test.js.map +1 -1
  56. package/build/indexing/workflow.d.ts +38 -0
  57. package/build/indexing/workflow.js +223 -0
  58. package/build/indexing/workflow.js.map +1 -0
  59. package/build/indexing/workflow.test.d.ts +1 -0
  60. package/build/indexing/workflow.test.js +218 -0
  61. package/build/indexing/workflow.test.js.map +1 -0
  62. package/build/processor/processor.d.ts +2 -2
  63. package/build/processor/processor.test.js +3 -3
  64. package/build/processor/processor.test.js.map +1 -1
  65. package/build/server.d.ts +88 -0
  66. package/build/server.js +1460 -0
  67. package/build/server.js.map +1 -0
  68. package/build/server.test.d.ts +1 -0
  69. package/build/server.test.js +27 -0
  70. package/build/server.test.js.map +1 -0
  71. package/build/storage/storage.d.ts +2 -7
  72. package/build/storage/storage.js +1 -55
  73. package/build/storage/storage.js.map +1 -1
  74. package/build/storage/storage.test.js +25 -19
  75. package/build/storage/storage.test.js.map +1 -1
  76. package/build/types.d.ts +1 -29
  77. package/build/util/docs.js +1 -2
  78. package/build/util/docs.js.map +1 -1
  79. package/build/util/docs.test.js +8 -2
  80. package/build/util/docs.test.js.map +1 -1
  81. package/build/util/security.d.ts +1 -6
  82. package/build/util/security.js +7 -14
  83. package/build/util/security.js.map +1 -1
  84. package/build/util/security.test.js +7 -14
  85. package/build/util/security.test.js.map +1 -1
  86. package/package.json +2 -6
  87. package/build/crawler/content-extractors.d.ts +0 -9
  88. package/build/crawler/content-extractors.js +0 -9
  89. package/build/crawler/content-extractors.js.map +0 -1
@@ -0,0 +1,88 @@
1
+ export declare class WebDocsServer {
2
+ private server;
3
+ private config;
4
+ private store;
5
+ private processor;
6
+ private statusTracker;
7
+ private indexingQueue;
8
+ private authManager;
9
+ private indexingWorkflow;
10
+ private runPromise?;
11
+ private closePromise?;
12
+ private activeToolCalls;
13
+ /** Maps operation ID to progress token for MCP notifications */
14
+ private progressTokens;
15
+ /** Tracks last notified progress to throttle notifications */
16
+ private lastNotifiedProgress;
17
+ constructor();
18
+ /**
19
+ * Send MCP progress notification to client.
20
+ * Only sends if the client provided a progressToken in the original request.
21
+ * Throttled to avoid flooding - sends on 5% increments or status changes.
22
+ */
23
+ private sendProgressNotification;
24
+ private initialize;
25
+ private setupToolHandlers;
26
+ private handleAddDocumentation;
27
+ private handleListDocumentation;
28
+ private handleSearchDocumentation;
29
+ private handleReindexDocumentation;
30
+ private handleGetIndexingStatus;
31
+ /**
32
+ * Handle interactive authentication request.
33
+ * Opens a visible browser for the user to login manually.
34
+ */
35
+ private handleAuthenticate;
36
+ /**
37
+ * Handle clearing saved authentication for a domain
38
+ */
39
+ private handleClearAuth;
40
+ /**
41
+ * Handle deleting an indexed documentation site and all its data
42
+ */
43
+ private handleDeleteDocumentation;
44
+ /**
45
+ * Handle setting tags for a documentation site
46
+ */
47
+ private handleSetTags;
48
+ /**
49
+ * Handle listing all tags with usage counts
50
+ */
51
+ private handleListTags;
52
+ /**
53
+ * Handle creating a new collection
54
+ */
55
+ private handleCreateCollection;
56
+ /**
57
+ * Handle deleting a collection
58
+ */
59
+ private handleDeleteCollection;
60
+ /**
61
+ * Handle updating a collection's metadata
62
+ */
63
+ private handleUpdateCollection;
64
+ /**
65
+ * Handle listing all collections
66
+ */
67
+ private handleListCollections;
68
+ /**
69
+ * Handle getting a specific collection with its documents
70
+ */
71
+ private handleGetCollection;
72
+ /**
73
+ * Handle adding documents to a collection
74
+ */
75
+ private handleAddToCollection;
76
+ /**
77
+ * Handle removing documents from a collection
78
+ */
79
+ private handleRemoveFromCollection;
80
+ /**
81
+ * Handle searching within a collection
82
+ */
83
+ private handleSearchCollection;
84
+ run(): Promise<void>;
85
+ private start;
86
+ close(): Promise<void>;
87
+ private closeResources;
88
+ }