@j0hanz/fetch-url-mcp 1.11.5 → 1.11.7
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/dist/http/auth.d.ts.map +1 -1
- package/dist/http/auth.js +1 -1
- package/dist/http/health.js +1 -1
- package/dist/http/native.d.ts.map +1 -1
- package/dist/http/native.js +2 -6
- package/dist/lib/cache.d.ts +48 -0
- package/dist/lib/cache.d.ts.map +1 -0
- package/dist/lib/cache.js +264 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +5 -2
- package/dist/lib/core.d.ts +1 -40
- package/dist/lib/core.d.ts.map +1 -1
- package/dist/lib/core.js +2 -233
- package/dist/lib/fetch-pipeline.d.ts.map +1 -1
- package/dist/lib/fetch-pipeline.js +7 -6
- package/dist/lib/http.d.ts.map +1 -1
- package/dist/lib/http.js +2 -3
- package/dist/lib/mcp-interop.d.ts +2 -2
- package/dist/lib/mcp-interop.d.ts.map +1 -1
- package/dist/lib/mcp-interop.js +15 -13
- package/dist/lib/session.d.ts.map +1 -1
- package/dist/lib/session.js +5 -9
- package/dist/lib/url.d.ts +1 -1
- package/dist/lib/url.d.ts.map +1 -1
- package/dist/lib/url.js +67 -82
- package/dist/lib/utils.d.ts +2 -2
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +21 -12
- package/dist/lib/zod.d.ts.map +1 -1
- package/dist/lib/zod.js +11 -17
- package/dist/resources/index.d.ts +21 -0
- package/dist/resources/index.d.ts.map +1 -1
- package/dist/resources/index.js +47 -72
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/tasks/execution.d.ts.map +1 -1
- package/dist/tasks/execution.js +19 -4
- package/dist/tasks/handlers.d.ts.map +1 -1
- package/dist/tasks/handlers.js +3 -4
- package/dist/tasks/manager.d.ts.map +1 -1
- package/dist/tasks/manager.js +11 -8
- package/dist/tasks/owner.d.ts.map +1 -1
- package/dist/tasks/owner.js +4 -4
- package/dist/tasks/waiters.js +1 -1
- package/dist/tools/fetch-url.d.ts.map +1 -1
- package/dist/tools/fetch-url.js +3 -6
- package/dist/transform/html-translators.js +7 -7
- package/dist/transform/next-flight.d.ts.map +1 -1
- package/dist/transform/next-flight.js +8 -2
- package/dist/transform/transform.d.ts.map +1 -1
- package/dist/transform/transform.js +5 -7
- package/package.json +1 -1
- package/dist/lib/task-handlers.d.ts +0 -11
- package/dist/lib/task-handlers.d.ts.map +0 -1
- package/dist/lib/task-handlers.js +0 -151
package/dist/http/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/http/auth.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEjE,OAAO,EACL,iBAAiB,EAElB,MAAM,iDAAiD,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAY/E,OAAO,EAEL,KAAK,cAAc,EAIpB,MAAM,cAAc,CAAC;AAMtB,cAAM,UAAU;IAId,MAAM,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO;CAuBrC;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC;AAS3C,cAAM,sBAAuB,SAAQ,iBAAiB;IAElD,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE;gBAAjC,cAAc,EAAE,SAAS,MAAM,EAAE,EAC1C,OAAO,SAAuB;CAKjC;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,sBAAsB,CAEjC;AAwCD,cAAM,gBAAgB;IACpB,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO;IA2BtC,OAAO,CAAC,iBAAiB;IAMzB,OAAO,CAAC,oBAAoB;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/http/auth.ts"],"names":[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zE;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|
package/dist/http/auth.js
CHANGED
|
@@ -106,7 +106,7 @@ class HostOriginPolicy {
|
|
|
106
106
|
const hostHeader = getHeaderValue(req, 'host');
|
|
107
107
|
if (!hostHeader)
|
|
108
108
|
return null;
|
|
109
|
-
const isEncrypted = req.socket
|
|
109
|
+
const isEncrypted = Reflect.get(req.socket, 'encrypted') === true;
|
|
110
110
|
const scheme = isEncrypted ? 'https' : 'http';
|
|
111
111
|
const parsed = parseUrlOrNull(`${scheme}://${hostHeader}`);
|
|
112
112
|
if (!parsed)
|
package/dist/http/health.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { freemem, hostname, totalmem } from 'node:os';
|
|
2
2
|
import { monitorEventLoopDelay, performance } from 'node:perf_hooks';
|
|
3
3
|
import process from 'node:process';
|
|
4
|
-
import { keys as cacheKeys } from '../lib/
|
|
4
|
+
import { keys as cacheKeys } from '../lib/cache.js';
|
|
5
5
|
import { config, serverVersion } from '../lib/core.js';
|
|
6
6
|
import { getTransformPoolStats } from '../transform/transform.js';
|
|
7
7
|
import { sendJson } from './helpers.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/http/native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/http/native.ts"],"names":[],"mappings":"AAmoCA,wBAAsB,eAAe,IAAI,OAAO,CAAC;IAC/C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CA0DD"}
|
package/dist/http/native.js
CHANGED
|
@@ -7,14 +7,10 @@ import { hostname } from 'node:os';
|
|
|
7
7
|
import process from 'node:process';
|
|
8
8
|
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
9
9
|
import { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';
|
|
10
|
-
import { config, enableHttpMode } from '../lib/core.js';
|
|
11
|
-
import { logError, logInfo, registerMcpSessionServer, runWithRequestContext, } from '../lib/core.js';
|
|
12
|
-
import { composeCloseHandlers, createSessionStore, createSlotTracker, ensureSessionCapacity, reserveSessionSlot, startSessionCleanupLoop, } from '../lib/core.js';
|
|
10
|
+
import { composeCloseHandlers, config, createSessionStore, createSlotTracker, enableHttpMode, ensureSessionCapacity, logError, logInfo, registerMcpSessionServer, reserveSessionSlot, runWithRequestContext, startSessionCleanupLoop, } from '../lib/core.js';
|
|
13
11
|
import { handleDownload } from '../lib/http.js';
|
|
14
12
|
import { acceptsEventStream, acceptsJsonAndEventStream, isJsonRpcBatchRequest, isMcpMessageBody, isMcpRequestBody, } from '../lib/mcp-interop.js';
|
|
15
|
-
import { toError } from '../lib/utils.js';
|
|
16
|
-
import { applyHttpServerTuning, drainConnectionsOnShutdown, } from '../lib/utils.js';
|
|
17
|
-
import { isObject } from '../lib/utils.js';
|
|
13
|
+
import { applyHttpServerTuning, drainConnectionsOnShutdown, isObject, toError, } from '../lib/utils.js';
|
|
18
14
|
import { createMcpServerForHttpSession } from '../server.js';
|
|
19
15
|
import { applyInsufficientScopeAuthHeaders, applyUnauthorizedAuthHeaders, assertHttpModeConfiguration, authService, buildAuthFingerprint, buildProtectedResourceMetadataDocument, corsPolicy, DEFAULT_MCP_PROTOCOL_VERSION, ensureMcpProtocolVersion, hostOriginPolicy, isInsufficientScopeError, isOAuthMetadataEnabled, isProtectedResourceMetadataPath, SUPPORTED_MCP_PROTOCOL_VERSIONS, } from './auth.js';
|
|
20
16
|
import { disableEventLoopMonitoring, isVerboseHealthRequest, resetEventLoopMonitoring, sendHealthRouteResponse, shouldHandleHealthRoute, } from './health.js';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare function toCacheScopeId(sessionId?: string): string;
|
|
2
|
+
interface CacheEntry {
|
|
3
|
+
url: string;
|
|
4
|
+
title?: string;
|
|
5
|
+
content: string;
|
|
6
|
+
fetchedAt: string;
|
|
7
|
+
expiresAt: string;
|
|
8
|
+
scopeIds?: string[];
|
|
9
|
+
}
|
|
10
|
+
interface CacheKeyParts {
|
|
11
|
+
namespace: string;
|
|
12
|
+
urlHash: string;
|
|
13
|
+
}
|
|
14
|
+
interface CacheSetOptions {
|
|
15
|
+
force?: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface CacheGetOptions {
|
|
18
|
+
force?: boolean;
|
|
19
|
+
scopeId?: string;
|
|
20
|
+
}
|
|
21
|
+
interface CacheEntryMetadata {
|
|
22
|
+
url: string;
|
|
23
|
+
title?: string;
|
|
24
|
+
scopeIds?: string[];
|
|
25
|
+
}
|
|
26
|
+
interface CacheUpdateEvent {
|
|
27
|
+
cacheKey: string;
|
|
28
|
+
namespace: string;
|
|
29
|
+
urlHash: string;
|
|
30
|
+
listChanged: boolean;
|
|
31
|
+
scopeIds: string[];
|
|
32
|
+
}
|
|
33
|
+
type CacheUpdateListener = (event: CacheUpdateEvent) => unknown;
|
|
34
|
+
export declare function createCacheKey(namespace: string, url: string, vary?: Record<string, unknown> | string): string | null;
|
|
35
|
+
export declare function parseCacheKey(cacheKey: string): CacheKeyParts | null;
|
|
36
|
+
export declare function onCacheUpdate(listener: CacheUpdateListener): () => void;
|
|
37
|
+
export declare function get(cacheKey: string | null, options?: CacheGetOptions): CacheEntry | undefined;
|
|
38
|
+
export declare function set(cacheKey: string | null, content: string, metadata: CacheEntryMetadata, options?: CacheSetOptions): void;
|
|
39
|
+
export declare function keys(): readonly string[];
|
|
40
|
+
export declare function getEntryMeta(cacheKey: string): {
|
|
41
|
+
url: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
fetchedAt?: string;
|
|
44
|
+
scopeIds: string[];
|
|
45
|
+
} | undefined;
|
|
46
|
+
export declare function isEnabled(): boolean;
|
|
47
|
+
export {};
|
|
48
|
+
//# sour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a,CAAC,QAAQ,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CASpE;AAgOD,wBAAgB,aAAa,CAAC,QAAQ,EAAE,mBAAmB,GAAG,MAAM,IAAI,CAEvE;AACD,wBAAgB,GAAG,CACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,CAAC,EAAE,eAAe,GACxB,UAAU,GAAG,SAAS,CAExB;AACD,wBAAgB,GAAG,CACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,EACvB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,CAAC,EAAE,eAAe,GACxB,IAAI,CAEN;AACD,wBAAgB,IAAI,IAAI,SAAS,MAAM,EAAE,CAExC;AACD,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,MAAM,GAEd;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GACvE,SAAS,CASZ;AACD,wBAAgB,SAAS,IAAI,OAAO,CAEnC"}
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { EventEmitter } from 'node:events';
|
|
2
|
+
import { config } from './config.js';
|
|
3
|
+
import { logWarn } from './core.js';
|
|
4
|
+
import { getErrorMessage, sha256Hex, stableStringify as stableJsonStringify, } from './utils.js';
|
|
5
|
+
const PRIMARY_HASH_LENGTH = 32;
|
|
6
|
+
const VARY_HASH_LENGTH = 16;
|
|
7
|
+
const STDIO_CACHE_SCOPE_ID = 'stdio';
|
|
8
|
+
export function toCacheScopeId(sessionId) {
|
|
9
|
+
return sessionId ? `session:${sessionId}` : STDIO_CACHE_SCOPE_ID;
|
|
10
|
+
}
|
|
11
|
+
function normalizeScopeIds(scopeIds) {
|
|
12
|
+
const normalized = (scopeIds ?? [STDIO_CACHE_SCOPE_ID]).filter((value) => typeof value === 'string' && value.length > 0);
|
|
13
|
+
return normalized.length > 0
|
|
14
|
+
? [...new Set(normalized)]
|
|
15
|
+
: [STDIO_CACHE_SCOPE_ID];
|
|
16
|
+
}
|
|
17
|
+
export function createCacheKey(namespace, url, vary) {
|
|
18
|
+
if (!namespace || !url)
|
|
19
|
+
return null;
|
|
20
|
+
const urlHash = sha256Hex(url).substring(0, PRIMARY_HASH_LENGTH);
|
|
21
|
+
if (!vary)
|
|
22
|
+
return `${namespace}:${urlHash}`;
|
|
23
|
+
let varyString;
|
|
24
|
+
if (typeof vary === 'string') {
|
|
25
|
+
varyString = vary;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
try {
|
|
29
|
+
varyString = stableJsonStringify(vary);
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const varyHash = varyString
|
|
36
|
+
? sha256Hex(varyString).substring(0, VARY_HASH_LENGTH)
|
|
37
|
+
: undefined;
|
|
38
|
+
return varyHash
|
|
39
|
+
? `${namespace}:${urlHash}.${varyHash}`
|
|
40
|
+
: `${namespace}:${urlHash}`;
|
|
41
|
+
}
|
|
42
|
+
export function parseCacheKey(cacheKey) {
|
|
43
|
+
if (!cacheKey)
|
|
44
|
+
return null;
|
|
45
|
+
const separatorIndex = cacheKey.indexOf(':');
|
|
46
|
+
if (separatorIndex === -1)
|
|
47
|
+
return null;
|
|
48
|
+
const namespace = cacheKey.slice(0, separatorIndex);
|
|
49
|
+
const urlHash = cacheKey.slice(separatorIndex + 1);
|
|
50
|
+
if (!namespace || !urlHash)
|
|
51
|
+
return null;
|
|
52
|
+
return { namespace, urlHash };
|
|
53
|
+
}
|
|
54
|
+
class InMemoryCacheStore {
|
|
55
|
+
max = config.cache.maxKeys;
|
|
56
|
+
maxBytes = config.cache.maxSizeBytes;
|
|
57
|
+
ttlMs = config.cache.ttl * 1000;
|
|
58
|
+
entries = new Map();
|
|
59
|
+
updateEmitter = new EventEmitter();
|
|
60
|
+
currentBytes = 0;
|
|
61
|
+
isEnabled() {
|
|
62
|
+
return config.cache.enabled;
|
|
63
|
+
}
|
|
64
|
+
isExpired(entry, now = Date.now()) {
|
|
65
|
+
return entry.expiresAtMs <= now;
|
|
66
|
+
}
|
|
67
|
+
keys() {
|
|
68
|
+
if (!this.isEnabled())
|
|
69
|
+
return [];
|
|
70
|
+
const now = Date.now();
|
|
71
|
+
const result = [];
|
|
72
|
+
for (const [key, entry] of this.entries) {
|
|
73
|
+
if (!this.isExpired(entry, now))
|
|
74
|
+
result.push(key);
|
|
75
|
+
}
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
onUpdate(listener) {
|
|
79
|
+
const safeListener = (event) => {
|
|
80
|
+
try {
|
|
81
|
+
const result = listener(event);
|
|
82
|
+
if (result instanceof Promise) {
|
|
83
|
+
void result.catch((error) => {
|
|
84
|
+
this.logError('Cache update listener failed (async)', event.cacheKey, error);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
this.logError('Cache update listener failed', event.cacheKey, error);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
this.updateEmitter.on('update', safeListener);
|
|
93
|
+
return () => {
|
|
94
|
+
this.updateEmitter.off('update', safeListener);
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
get(cacheKey, options) {
|
|
98
|
+
if (!cacheKey || (!this.isEnabled() && !options?.force))
|
|
99
|
+
return undefined;
|
|
100
|
+
const entry = this.entries.get(cacheKey);
|
|
101
|
+
if (!entry)
|
|
102
|
+
return undefined;
|
|
103
|
+
const now = Date.now();
|
|
104
|
+
if (this.isExpired(entry, now)) {
|
|
105
|
+
const removed = this.delete(cacheKey);
|
|
106
|
+
// listChanged=false: lazy eviction on read is silent — only writes change
|
|
107
|
+
// the list. Clients must not rely on list-changed events from reads.
|
|
108
|
+
this.notify(cacheKey, false, removed?.scopeIds);
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
const scopeId = options?.scopeId;
|
|
112
|
+
if (scopeId && !normalizeScopeIds(entry.scopeIds).includes(scopeId)) {
|
|
113
|
+
entry.scopeIds = normalizeScopeIds([
|
|
114
|
+
...normalizeScopeIds(entry.scopeIds),
|
|
115
|
+
scopeId,
|
|
116
|
+
]);
|
|
117
|
+
this.notify(cacheKey, true, [scopeId]);
|
|
118
|
+
}
|
|
119
|
+
// Refresh LRU position
|
|
120
|
+
this.entries.delete(cacheKey);
|
|
121
|
+
this.entries.set(cacheKey, entry);
|
|
122
|
+
return entry;
|
|
123
|
+
}
|
|
124
|
+
delete(cacheKey) {
|
|
125
|
+
const entry = this.entries.get(cacheKey);
|
|
126
|
+
if (entry) {
|
|
127
|
+
this.currentBytes -= entry.content.length;
|
|
128
|
+
this.entries.delete(cacheKey);
|
|
129
|
+
return entry;
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
evictOldestEntry() {
|
|
134
|
+
const firstKey = this.entries.keys().next();
|
|
135
|
+
return !firstKey.done ? this.delete(firstKey.value) : undefined;
|
|
136
|
+
}
|
|
137
|
+
ensureCapacity(cacheKey, entrySize) {
|
|
138
|
+
let listChanged = false;
|
|
139
|
+
const scopeIds = new Set();
|
|
140
|
+
while (this.currentBytes + entrySize > this.maxBytes) {
|
|
141
|
+
const evicted = this.evictOldestEntry();
|
|
142
|
+
if (evicted) {
|
|
143
|
+
listChanged = true;
|
|
144
|
+
for (const scopeId of normalizeScopeIds(evicted.scopeIds)) {
|
|
145
|
+
scopeIds.add(scopeId);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return { ok: true, listChanged, scopeIds: [...scopeIds] };
|
|
153
|
+
}
|
|
154
|
+
set(cacheKey, content, metadata, options) {
|
|
155
|
+
if (!cacheKey || !content)
|
|
156
|
+
return;
|
|
157
|
+
if (!this.isEnabled() && !options?.force)
|
|
158
|
+
return;
|
|
159
|
+
const now = Date.now();
|
|
160
|
+
const expiresAtMs = now + this.ttlMs;
|
|
161
|
+
const entrySize = content.length;
|
|
162
|
+
// Reject oversized entries before deleting the old one to avoid data loss
|
|
163
|
+
if (entrySize > this.maxBytes) {
|
|
164
|
+
logWarn('Cache entry exceeds max size', {
|
|
165
|
+
key: cacheKey,
|
|
166
|
+
size: entrySize,
|
|
167
|
+
max: this.maxBytes,
|
|
168
|
+
});
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const existingEntry = this.entries.get(cacheKey);
|
|
172
|
+
const isUpdate = existingEntry !== undefined;
|
|
173
|
+
if (isUpdate) {
|
|
174
|
+
this.delete(cacheKey);
|
|
175
|
+
}
|
|
176
|
+
const capacity = this.ensureCapacity(cacheKey, entrySize);
|
|
177
|
+
if (!capacity.ok)
|
|
178
|
+
return;
|
|
179
|
+
let listChanged = !isUpdate || capacity.listChanged;
|
|
180
|
+
const nextScopeIds = normalizeScopeIds([
|
|
181
|
+
...(existingEntry?.scopeIds ?? []),
|
|
182
|
+
...(metadata.scopeIds ?? []),
|
|
183
|
+
]);
|
|
184
|
+
const entry = {
|
|
185
|
+
url: metadata.url,
|
|
186
|
+
content,
|
|
187
|
+
fetchedAt: new Date(now).toISOString(),
|
|
188
|
+
expiresAt: new Date(expiresAtMs).toISOString(),
|
|
189
|
+
expiresAtMs,
|
|
190
|
+
scopeIds: nextScopeIds,
|
|
191
|
+
...(metadata.title ? { title: metadata.title } : {}),
|
|
192
|
+
};
|
|
193
|
+
this.entries.set(cacheKey, entry);
|
|
194
|
+
this.currentBytes += entrySize;
|
|
195
|
+
// Eviction (LRU: first insertion-order key) - Count based
|
|
196
|
+
if (this.entries.size > this.max && this.evictOldestEntry()) {
|
|
197
|
+
listChanged = true;
|
|
198
|
+
}
|
|
199
|
+
this.notify(cacheKey, listChanged, [
|
|
200
|
+
...new Set([...capacity.scopeIds, ...nextScopeIds]),
|
|
201
|
+
]);
|
|
202
|
+
}
|
|
203
|
+
notify(cacheKey, listChanged, scopeIds) {
|
|
204
|
+
if (this.updateEmitter.listenerCount('update') === 0)
|
|
205
|
+
return;
|
|
206
|
+
const parts = parseCacheKey(cacheKey);
|
|
207
|
+
if (!parts)
|
|
208
|
+
return;
|
|
209
|
+
this.updateEmitter.emit('update', {
|
|
210
|
+
cacheKey,
|
|
211
|
+
...parts,
|
|
212
|
+
listChanged,
|
|
213
|
+
scopeIds: normalizeScopeIds(scopeIds),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Read an entry without updating its LRU position.
|
|
218
|
+
* Use this for metadata access (e.g. resource listing) to avoid polluting the
|
|
219
|
+
* eviction order; expired entries are treated as absent but not evicted here.
|
|
220
|
+
*/
|
|
221
|
+
peek(cacheKey) {
|
|
222
|
+
if (!cacheKey)
|
|
223
|
+
return undefined;
|
|
224
|
+
const entry = this.entries.get(cacheKey);
|
|
225
|
+
if (!entry)
|
|
226
|
+
return undefined;
|
|
227
|
+
if (this.isExpired(entry))
|
|
228
|
+
return undefined;
|
|
229
|
+
return entry;
|
|
230
|
+
}
|
|
231
|
+
logError(message, cacheKey, error) {
|
|
232
|
+
logWarn(message, {
|
|
233
|
+
key: cacheKey.length > 100 ? cacheKey.slice(0, 100) : cacheKey,
|
|
234
|
+
error: getErrorMessage(error),
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const store = new InMemoryCacheStore();
|
|
239
|
+
export function onCacheUpdate(listener) {
|
|
240
|
+
return store.onUpdate(listener);
|
|
241
|
+
}
|
|
242
|
+
export function get(cacheKey, options) {
|
|
243
|
+
return store.get(cacheKey, options);
|
|
244
|
+
}
|
|
245
|
+
export function set(cacheKey, content, metadata, options) {
|
|
246
|
+
store.set(cacheKey, content, metadata, options);
|
|
247
|
+
}
|
|
248
|
+
export function keys() {
|
|
249
|
+
return store.keys();
|
|
250
|
+
}
|
|
251
|
+
export function getEntryMeta(cacheKey) {
|
|
252
|
+
const entry = store.peek(cacheKey);
|
|
253
|
+
if (!entry)
|
|
254
|
+
return undefined;
|
|
255
|
+
return {
|
|
256
|
+
url: entry.url,
|
|
257
|
+
scopeIds: normalizeScopeIds(entry.scopeIds),
|
|
258
|
+
...(entry.title !== undefined ? { title: entry.title } : {}),
|
|
259
|
+
...(entry.fetchedAt ? { fetchedAt: entry.fetchedAt } : {}),
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
export function isEnabled() {
|
|
263
|
+
return store.isEnabled();
|
|
264
|
+
}
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAgDA,eAAO,MAAM,aAAa,EAAE,MAA2C,CAAC;AAIxE,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AA2B3D,KAAK,mBAAmB,GAAG,SAAS,GAAG,SAAS,CAAC;AACjD,KAAK,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AA4OnC,UAAU,oBAAoB;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAyCD,UAAU,UAAU;IAClB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,GAAG,GAAG,SAAS,CAAC;IAC3B,gBAAgB,EAAE,GAAG,GAAG,SAAS,CAAC;IAClC,QAAQ,EAAE,GAAG,GAAG,SAAS,CAAC;IAC1B,aAAa,EAAE,GAAG,GAAG,SAAS,CAAC;IAC/B,eAAe,EAAE,GAAG,GAAG,SAAS,CAAC;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Ae,EAAE,MAAM,EAAE,CAAC;CAC3B;AAiBD,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+ClB,CAAC;AAEF,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
|
package/dist/lib/config.js
CHANGED
|
@@ -5,10 +5,13 @@ import { z } from 'zod';
|
|
|
5
5
|
import { buildIpv4, isIP, normalizeHostname, stripTrailingDots, } from './url.js';
|
|
6
6
|
import { getErrorMessage } from './utils.js';
|
|
7
7
|
// ── Version ─────────────────────────────────────────────────────────
|
|
8
|
+
function getObjectProperty(value, key) {
|
|
9
|
+
return value[key];
|
|
10
|
+
}
|
|
8
11
|
function hasPackageJsonVersion(value) {
|
|
9
12
|
return (typeof value === 'object' &&
|
|
10
13
|
value !== null &&
|
|
11
|
-
typeof value
|
|
14
|
+
typeof getObjectProperty(value, 'version') === 'string');
|
|
12
15
|
}
|
|
13
16
|
function readServerVersion(moduleUrl) {
|
|
14
17
|
const packageJsonPath = findPackageJSON(moduleUrl);
|
|
@@ -57,7 +60,7 @@ class ConfigError extends Error {
|
|
|
57
60
|
function isMissingEnvFileError(error) {
|
|
58
61
|
if (!error || typeof error !== 'object')
|
|
59
62
|
return false;
|
|
60
|
-
const
|
|
63
|
+
const code = getObjectProperty(error, 'code');
|
|
61
64
|
return code === 'ENOENT' || code === 'ERR_ENV_FILE_NOT_FOUND';
|
|
62
65
|
}
|
|
63
66
|
function loadEnvFileIfAvailable() {
|
package/dist/lib/core.d.ts
CHANGED
|
@@ -2,47 +2,8 @@ import { type McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
2
2
|
import type { SessionEntry } from './session.js';
|
|
3
3
|
import type { SessionStore } from './session.js';
|
|
4
4
|
export { config, enableHttpMode, serverVersion } from './config.js';
|
|
5
|
+
export { createCacheKey, get, getEntryMeta, isEnabled, keys, onCacheUpdate, parseCacheKey, set, } from './cache.js';
|
|
5
6
|
type McpLogLevel = 'debug' | 'info' | 'notice' | 'warning' | 'error' | 'critical' | 'alert' | 'emergency';
|
|
6
|
-
interface CacheEntry {
|
|
7
|
-
url: string;
|
|
8
|
-
title?: string;
|
|
9
|
-
content: string;
|
|
10
|
-
fetchedAt: string;
|
|
11
|
-
expiresAt: string;
|
|
12
|
-
}
|
|
13
|
-
interface CacheKeyParts {
|
|
14
|
-
namespace: string;
|
|
15
|
-
urlHash: string;
|
|
16
|
-
}
|
|
17
|
-
interface CacheSetOptions {
|
|
18
|
-
force?: boolean;
|
|
19
|
-
}
|
|
20
|
-
interface CacheGetOptions {
|
|
21
|
-
force?: boolean;
|
|
22
|
-
}
|
|
23
|
-
interface CacheEntryMetadata {
|
|
24
|
-
url: string;
|
|
25
|
-
title?: string;
|
|
26
|
-
}
|
|
27
|
-
interface CacheUpdateEvent {
|
|
28
|
-
cacheKey: string;
|
|
29
|
-
namespace: string;
|
|
30
|
-
urlHash: string;
|
|
31
|
-
listChanged: boolean;
|
|
32
|
-
}
|
|
33
|
-
type CacheUpdateListener = (event: CacheUpdateEvent) => unknown;
|
|
34
|
-
export declare function createCacheKey(namespace: string, url: string, vary?: Record<string, unknown> | string): string | null;
|
|
35
|
-
export declare function parseCacheKey(cacheKey: string): CacheKeyParts | null;
|
|
36
|
-
export declare function onCacheUpdate(listener: CacheUpdateListener): () => void;
|
|
37
|
-
export declare function get(cacheKey: string | null, options?: CacheGetOptions): CacheEntry | undefined;
|
|
38
|
-
export declare function set(cacheKey: string | null, content: string, metadata: CacheEntryMetadata, options?: CacheSetOptions): void;
|
|
39
|
-
export declare function keys(): readonly string[];
|
|
40
|
-
export declare function getEntryMeta(cacheKey: string): {
|
|
41
|
-
url: string;
|
|
42
|
-
title?: string;
|
|
43
|
-
fetchedAt?: string;
|
|
44
|
-
} | undefined;
|
|
45
|
-
export declare function isEnabled(): boolean;
|
|
46
7
|
type LogMetadata = Record<string, unknown>;
|
|
47
8
|
interface RequestContext {
|
|
48
9
|
readonly requestId: string;
|
package/dist/lib/core.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/lib/core.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/lib/core.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAOjD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,cAAc,EACd,GAAG,EACH,YAAY,EACZ,SAAS,EACT,IAAI,EACJ,aAAa,EACb,aAAa,EACb,GAAG,GACJ,MAAM,YAAY,CAAC;AAEpB,KAAK,WAAW,GACZ,OAAO,GACP,MAAM,GACN,QAAQ,GACR,SAAS,GACT,OAAO,GACP,UAAU,GACV,OAAO,GACP,WAAW,CAAC;AAEhB,KAAK,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,UAAU,cAAc;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAC/B;AAkBD,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAKpD;AACD,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,SAAS,GAChB,IAAI,CAGN;AACD,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAIlE;AACD,wBAAgB,kCAAkC,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAM1E;AACD,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,S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