@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.
- package/build/__mocks__/embeddings.d.ts +0 -4
- package/build/__mocks__/embeddings.js +0 -9
- package/build/__mocks__/embeddings.js.map +1 -1
- package/build/config.d.ts +0 -2
- package/build/config.js +0 -40
- package/build/config.js.map +1 -1
- package/build/config.test.js +1 -36
- package/build/config.test.js.map +1 -1
- package/build/crawler/auth.d.ts +0 -17
- package/build/crawler/auth.js +1 -40
- package/build/crawler/auth.js.map +1 -1
- package/build/crawler/auth.test.js +4 -22
- package/build/crawler/auth.test.js.map +1 -1
- package/build/crawler/base.d.ts +0 -13
- package/build/crawler/base.js +4 -116
- package/build/crawler/base.js.map +1 -1
- package/build/crawler/base.test.js +2 -172
- package/build/crawler/base.test.js.map +1 -1
- package/build/crawler/content-utils.d.ts +0 -1
- package/build/crawler/content-utils.js +0 -8
- package/build/crawler/content-utils.js.map +1 -1
- package/build/crawler/content-utils.test.js +1 -41
- package/build/crawler/content-utils.test.js.map +1 -1
- package/build/crawler/crawlee-crawler.d.ts +2 -21
- package/build/crawler/crawlee-crawler.js +0 -1
- package/build/crawler/crawlee-crawler.js.map +1 -1
- package/build/crawler/crawlee-crawler.test.js +13 -0
- package/build/crawler/crawlee-crawler.test.js.map +1 -1
- package/build/crawler/docs-crawler.d.ts +3 -4
- package/build/crawler/docs-crawler.js +3 -5
- package/build/crawler/docs-crawler.js.map +1 -1
- package/build/crawler/docs-crawler.test.js +3 -9
- package/build/crawler/docs-crawler.test.js.map +1 -1
- package/build/crawler/github.d.ts +1 -1
- package/build/crawler/github.js +7 -7
- package/build/crawler/github.js.map +1 -1
- package/build/crawler/github.test.js +8 -19
- package/build/crawler/github.test.js.map +1 -1
- package/build/crawler/llms-txt.js +5 -3
- package/build/crawler/llms-txt.js.map +1 -1
- package/build/crawler/llms-txt.test.js +2 -0
- package/build/crawler/llms-txt.test.js.map +1 -1
- package/build/crawler/site-rules.js +6 -4
- package/build/crawler/site-rules.js.map +1 -1
- package/build/index.js +7 -1687
- package/build/index.js.map +1 -1
- package/build/index.test.js +124 -422
- package/build/index.test.js.map +1 -1
- package/build/indexing/queue-manager.js +3 -2
- package/build/indexing/queue-manager.js.map +1 -1
- package/build/indexing/status.d.ts +0 -5
- package/build/indexing/status.js +1 -26
- package/build/indexing/status.js.map +1 -1
- package/build/indexing/status.test.js +0 -24
- package/build/indexing/status.test.js.map +1 -1
- package/build/indexing/workflow.d.ts +38 -0
- package/build/indexing/workflow.js +223 -0
- package/build/indexing/workflow.js.map +1 -0
- package/build/indexing/workflow.test.d.ts +1 -0
- package/build/indexing/workflow.test.js +218 -0
- package/build/indexing/workflow.test.js.map +1 -0
- package/build/processor/processor.d.ts +2 -2
- package/build/processor/processor.test.js +3 -3
- package/build/processor/processor.test.js.map +1 -1
- package/build/server.d.ts +88 -0
- package/build/server.js +1460 -0
- package/build/server.js.map +1 -0
- package/build/server.test.d.ts +1 -0
- package/build/server.test.js +27 -0
- package/build/server.test.js.map +1 -0
- package/build/storage/storage.d.ts +2 -7
- package/build/storage/storage.js +1 -55
- package/build/storage/storage.js.map +1 -1
- package/build/storage/storage.test.js +25 -19
- package/build/storage/storage.test.js.map +1 -1
- package/build/types.d.ts +1 -29
- package/build/util/docs.js +1 -2
- package/build/util/docs.js.map +1 -1
- package/build/util/docs.test.js +8 -2
- package/build/util/docs.test.js.map +1 -1
- package/build/util/security.d.ts +1 -6
- package/build/util/security.js +7 -14
- package/build/util/security.js.map +1 -1
- package/build/util/security.test.js +7 -14
- package/build/util/security.test.js.map +1 -1
- package/package.json +2 -6
- package/build/crawler/content-extractors.d.ts +0 -9
- package/build/crawler/content-extractors.js +0 -9
- 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
|
+
}
|