@cyanheads/mcp-ts-core 0.13.7 → 0.13.8
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/AGENTS.md +3 -3
- package/CLAUDE.md +3 -3
- package/README.md +3 -1
- package/changelog/0.13.x/0.13.8.md +101 -0
- package/dist/config/index.d.ts +9 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +19 -0
- package/dist/config/index.js.map +1 -1
- package/dist/core/app.d.ts.map +1 -1
- package/dist/core/app.js +14 -2
- package/dist/core/app.js.map +1 -1
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/context.js +13 -3
- package/dist/core/context.js.map +1 -1
- package/dist/core/worker.d.ts +2 -0
- package/dist/core/worker.d.ts.map +1 -1
- package/dist/core/worker.js +2 -0
- package/dist/core/worker.js.map +1 -1
- package/dist/linter/rules/enrichment-rules.d.ts +3 -2
- package/dist/linter/rules/enrichment-rules.d.ts.map +1 -1
- package/dist/linter/rules/enrichment-rules.js +9 -2
- package/dist/linter/rules/enrichment-rules.js.map +1 -1
- package/dist/linter/rules/handler-body-rules.d.ts.map +1 -1
- package/dist/linter/rules/handler-body-rules.js +10 -4
- package/dist/linter/rules/handler-body-rules.js.map +1 -1
- package/dist/linter/rules/schema-rules.d.ts +5 -0
- package/dist/linter/rules/schema-rules.d.ts.map +1 -1
- package/dist/linter/rules/schema-rules.js +44 -17
- package/dist/linter/rules/schema-rules.js.map +1 -1
- package/dist/mcp-server/outputContract.d.ts +33 -0
- package/dist/mcp-server/outputContract.d.ts.map +1 -0
- package/dist/mcp-server/outputContract.js +43 -0
- package/dist/mcp-server/outputContract.js.map +1 -0
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js +10 -2
- package/dist/mcp-server/resources/utils/resourceHandlerFactory.js.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts +16 -5
- package/dist/mcp-server/tools/utils/toolHandlerFactory.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js +65 -13
- package/dist/mcp-server/tools/utils/toolHandlerFactory.js.map +1 -1
- package/dist/mcp-server/transports/auth/lib/authUtils.js +4 -1
- package/dist/mcp-server/transports/auth/lib/authUtils.js.map +1 -1
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js +1 -1
- package/dist/mcp-server/transports/auth/strategies/jwtStrategy.js.map +1 -1
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.d.ts.map +1 -1
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js +2 -5
- package/dist/mcp-server/transports/auth/strategies/oauthStrategy.js.map +1 -1
- package/dist/mcp-server/transports/http/sessionStore.d.ts.map +1 -1
- package/dist/mcp-server/transports/http/sessionStore.js +2 -2
- package/dist/mcp-server/transports/http/sessionStore.js.map +1 -1
- package/dist/services/canvas/core/CanvasRegistry.js +1 -1
- package/dist/services/canvas/core/CanvasRegistry.js.map +1 -1
- package/dist/services/canvas/core/DataCanvas.d.ts.map +1 -1
- package/dist/services/canvas/core/DataCanvas.js +7 -5
- package/dist/services/canvas/core/DataCanvas.js.map +1 -1
- package/dist/services/canvas/core/canvasFactory.d.ts.map +1 -1
- package/dist/services/canvas/core/canvasFactory.js +2 -2
- package/dist/services/canvas/core/canvasFactory.js.map +1 -1
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.d.ts.map +1 -1
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.js +25 -16
- package/dist/services/canvas/providers/duckdb/DuckdbProvider.js.map +1 -1
- package/dist/services/llm/providers/openrouter.provider.js +1 -1
- package/dist/services/llm/providers/openrouter.provider.js.map +1 -1
- package/dist/services/speech/providers/elevenlabs.provider.js +3 -3
- package/dist/services/speech/providers/elevenlabs.provider.js.map +1 -1
- package/dist/services/speech/providers/whisper.provider.d.ts.map +1 -1
- package/dist/services/speech/providers/whisper.provider.js +5 -5
- package/dist/services/speech/providers/whisper.provider.js.map +1 -1
- package/dist/storage/core/StorageService.d.ts.map +1 -1
- package/dist/storage/core/StorageService.js +3 -6
- package/dist/storage/core/StorageService.js.map +1 -1
- package/dist/storage/core/storageFactory.d.ts.map +1 -1
- package/dist/storage/core/storageFactory.js +12 -15
- package/dist/storage/core/storageFactory.js.map +1 -1
- package/dist/storage/core/storageValidation.d.ts +13 -13
- package/dist/storage/core/storageValidation.d.ts.map +1 -1
- package/dist/storage/core/storageValidation.js +49 -125
- package/dist/storage/core/storageValidation.js.map +1 -1
- package/dist/storage/providers/cloudflare/d1Provider.d.ts.map +1 -1
- package/dist/storage/providers/cloudflare/d1Provider.js +5 -3
- package/dist/storage/providers/cloudflare/d1Provider.js.map +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.d.ts.map +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.js +1 -1
- package/dist/storage/providers/cloudflare/kvProvider.js.map +1 -1
- package/dist/storage/providers/cloudflare/r2Provider.d.ts.map +1 -1
- package/dist/storage/providers/cloudflare/r2Provider.js +3 -3
- package/dist/storage/providers/cloudflare/r2Provider.js.map +1 -1
- package/dist/storage/providers/fileSystem/fileSystemProvider.js +4 -4
- package/dist/storage/providers/fileSystem/fileSystemProvider.js.map +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.d.ts +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.d.ts.map +1 -1
- package/dist/storage/providers/inMemory/inMemoryProvider.js +6 -5
- package/dist/storage/providers/inMemory/inMemoryProvider.js.map +1 -1
- package/dist/testing/fuzz.d.ts.map +1 -1
- package/dist/testing/fuzz.js +7 -1
- package/dist/testing/fuzz.js.map +1 -1
- package/dist/testing/index.d.ts +15 -2
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +51 -6
- package/dist/testing/index.js.map +1 -1
- package/dist/types-global/errors.d.ts +7 -4
- package/dist/types-global/errors.d.ts.map +1 -1
- package/dist/types-global/errors.js.map +1 -1
- package/dist/utils/formatting/codeSpan.d.ts +27 -0
- package/dist/utils/formatting/codeSpan.d.ts.map +1 -0
- package/dist/utils/formatting/codeSpan.js +42 -0
- package/dist/utils/formatting/codeSpan.js.map +1 -0
- package/dist/utils/formatting/diffFormatter.d.ts.map +1 -1
- package/dist/utils/formatting/diffFormatter.js +7 -15
- package/dist/utils/formatting/diffFormatter.js.map +1 -1
- package/dist/utils/formatting/markdownBuilder.d.ts +12 -5
- package/dist/utils/formatting/markdownBuilder.d.ts.map +1 -1
- package/dist/utils/formatting/markdownBuilder.js +14 -2
- package/dist/utils/formatting/markdownBuilder.js.map +1 -1
- package/dist/utils/formatting/tableFormatter.d.ts.map +1 -1
- package/dist/utils/formatting/tableFormatter.js +5 -9
- package/dist/utils/formatting/tableFormatter.js.map +1 -1
- package/dist/utils/formatting/treeFormatter.d.ts.map +1 -1
- package/dist/utils/formatting/treeFormatter.js +5 -9
- package/dist/utils/formatting/treeFormatter.js.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.d.ts +17 -10
- package/dist/utils/internal/error-handler/errorHandler.d.ts.map +1 -1
- package/dist/utils/internal/error-handler/errorHandler.js +47 -26
- package/dist/utils/internal/error-handler/errorHandler.js.map +1 -1
- package/dist/utils/internal/error-handler/mappings.d.ts +17 -1
- package/dist/utils/internal/error-handler/mappings.d.ts.map +1 -1
- package/dist/utils/internal/error-handler/mappings.js +22 -1
- package/dist/utils/internal/error-handler/mappings.js.map +1 -1
- package/dist/utils/internal/error-handler/types.d.ts +2 -0
- package/dist/utils/internal/error-handler/types.d.ts.map +1 -1
- package/dist/utils/internal/logger.d.ts +75 -3
- package/dist/utils/internal/logger.d.ts.map +1 -1
- package/dist/utils/internal/logger.js +181 -52
- package/dist/utils/internal/logger.js.map +1 -1
- package/dist/utils/internal/performance.d.ts +11 -0
- package/dist/utils/internal/performance.d.ts.map +1 -1
- package/dist/utils/internal/performance.js +46 -12
- package/dist/utils/internal/performance.js.map +1 -1
- package/dist/utils/network/fetchWithTimeout.d.ts +11 -5
- package/dist/utils/network/fetchWithTimeout.d.ts.map +1 -1
- package/dist/utils/network/fetchWithTimeout.js +50 -23
- package/dist/utils/network/fetchWithTimeout.js.map +1 -1
- package/dist/utils/network/retry.d.ts +16 -8
- package/dist/utils/network/retry.d.ts.map +1 -1
- package/dist/utils/network/retry.js +19 -8
- package/dist/utils/network/retry.js.map +1 -1
- package/dist/utils/overflow/outlineOnOverflow.d.ts +18 -2
- package/dist/utils/overflow/outlineOnOverflow.d.ts.map +1 -1
- package/dist/utils/overflow/outlineOnOverflow.js +28 -3
- package/dist/utils/overflow/outlineOnOverflow.js.map +1 -1
- package/dist/utils/pagination/pagination.d.ts +3 -1
- package/dist/utils/pagination/pagination.d.ts.map +1 -1
- package/dist/utils/pagination/pagination.js +10 -2
- package/dist/utils/pagination/pagination.js.map +1 -1
- package/dist/utils/parsing/csvParser.d.ts.map +1 -1
- package/dist/utils/parsing/csvParser.js +4 -2
- package/dist/utils/parsing/csvParser.js.map +1 -1
- package/dist/utils/parsing/htmlExtractor.js +1 -1
- package/dist/utils/parsing/htmlExtractor.js.map +1 -1
- package/dist/utils/parsing/jsonParser.d.ts.map +1 -1
- package/dist/utils/parsing/jsonParser.js +3 -1
- package/dist/utils/parsing/jsonParser.js.map +1 -1
- package/dist/utils/parsing/xmlParser.d.ts.map +1 -1
- package/dist/utils/parsing/xmlParser.js +3 -1
- package/dist/utils/parsing/xmlParser.js.map +1 -1
- package/dist/utils/parsing/yamlParser.d.ts.map +1 -1
- package/dist/utils/parsing/yamlParser.js +3 -1
- package/dist/utils/parsing/yamlParser.js.map +1 -1
- package/dist/utils/security/idGenerator.d.ts.map +1 -1
- package/dist/utils/security/idGenerator.js +20 -4
- package/dist/utils/security/idGenerator.js.map +1 -1
- package/dist/utils/security/sanitization.d.ts +31 -0
- package/dist/utils/security/sanitization.d.ts.map +1 -1
- package/dist/utils/security/sanitization.js +98 -11
- package/dist/utils/security/sanitization.js.map +1 -1
- package/dist/utils/telemetry/attributes.d.ts +16 -1
- package/dist/utils/telemetry/attributes.d.ts.map +1 -1
- package/dist/utils/telemetry/attributes.js +16 -1
- package/dist/utils/telemetry/attributes.js.map +1 -1
- package/dist/utils/telemetry/instrumentation.d.ts +9 -3
- package/dist/utils/telemetry/instrumentation.d.ts.map +1 -1
- package/dist/utils/telemetry/instrumentation.js +85 -13
- package/dist/utils/telemetry/instrumentation.js.map +1 -1
- package/framework-skills/api-auth/SKILL.md +3 -1
- package/framework-skills/api-canvas/SKILL.md +3 -3
- package/framework-skills/api-config/SKILL.md +6 -3
- package/framework-skills/api-context/SKILL.md +3 -3
- package/framework-skills/api-errors/SKILL.md +16 -11
- package/framework-skills/api-linter/SKILL.md +7 -3
- package/framework-skills/api-telemetry/SKILL.md +31 -11
- package/framework-skills/api-testing/SKILL.md +5 -3
- package/framework-skills/api-utils/SKILL.md +9 -9
- package/framework-skills/api-utils/references/formatting.md +1 -1
- package/framework-skills/api-utils/references/parsing.md +2 -2
- package/framework-skills/api-utils/references/security.md +6 -4
- package/framework-skills/git-wrapup/SKILL.md +5 -2
- package/framework-skills/maintenance/SKILL.md +2 -2
- package/framework-skills/polish-docs-meta/SKILL.md +1 -1
- package/framework-skills/polish-docs-meta/references/readme.md +1 -0
- package/framework-skills/release-and-publish/SKILL.md +2 -2
- package/framework-skills/techniques/SKILL.md +1 -1
- package/framework-skills/techniques/references/outline-on-overflow.md +12 -7
- package/package.json +18 -3
- package/scripts/check-skill-versions.ts +103 -22
- package/scripts/devcheck.ts +4 -3
- package/scripts/lint-packaging.ts +38 -1
- package/templates/.env.example +4 -0
- package/templates/Dockerfile +26 -6
- package/templates/package.json +1 -0
|
@@ -30,12 +30,9 @@ function requireTenantId(context) {
|
|
|
30
30
|
const tenantId = context.tenantId;
|
|
31
31
|
// Check if tenant ID is missing (undefined or null)
|
|
32
32
|
if (tenantId === undefined || tenantId === null) {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
// Include call stack hint for debugging
|
|
37
|
-
calledFrom: 'StorageService',
|
|
38
|
-
});
|
|
33
|
+
// No data: request metadata is not something the caller acts on, and the
|
|
34
|
+
// handler's error path logs it with the full context (#548).
|
|
35
|
+
throw new McpError(JsonRpcErrorCode.InternalError, 'Tenant ID is required for storage operations but was not found in the request context.');
|
|
39
36
|
}
|
|
40
37
|
// Delegate validation to shared utility
|
|
41
38
|
validateTenantId(tenantId, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageService.js","sourceRoot":"","sources":["../../../src/storage/core/StorageService.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,gBAAgB,GACjB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACxD,OAAO,EAAuB,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD;;;;;;;;;;;;GAYG;AACH,SAAS,eAAe,CAAC,OAAuB;IAC9C,MAAM,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAElC,oDAAoD;IACpD,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,IAAI,QAAQ,CA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AC;IACnC,mCAAmC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACpD;
|
|
1
|
+
{"version":3,"file":"storageFactory.d.ts","sourceRoot":"","sources":["../../../src/storage/core/storageFactory.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAM3E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gDAAgD,CAAC;AAW/E;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,qCAAqC;IACrC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,sCAAsC;IACtC,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;IACnC,mCAAmC;IACnC,QAAQ,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAC7B,qCAAqC;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACpD;AAgBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE,kBAAuB,GAC5B,gBAAgB,CA4ElB"}
|
|
@@ -15,10 +15,10 @@ function isServerless() {
|
|
|
15
15
|
* Retrieves a Cloudflare binding from globalThis by key.
|
|
16
16
|
* Throws a ConfigurationError if the binding is not present.
|
|
17
17
|
*/
|
|
18
|
-
function getGlobalBinding(key
|
|
18
|
+
function getGlobalBinding(key) {
|
|
19
19
|
const g = globalThis;
|
|
20
20
|
if (!(key in g) || g[key] == null) {
|
|
21
|
-
throw configurationError(`${key} binding not available in globalThis. Ensure wrangler.toml is configured correctly
|
|
21
|
+
throw configurationError(`${key} binding not available in globalThis. Ensure wrangler.toml is configured correctly.`);
|
|
22
22
|
}
|
|
23
23
|
return g[key];
|
|
24
24
|
}
|
|
@@ -75,15 +75,15 @@ export function createStorageProvider(config, deps = {}) {
|
|
|
75
75
|
return new InMemoryProvider();
|
|
76
76
|
case 'filesystem':
|
|
77
77
|
if (!config.storage.filesystemPath) {
|
|
78
|
-
throw configurationError('STORAGE_FILESYSTEM_PATH must be set for the filesystem storage provider.'
|
|
78
|
+
throw configurationError('STORAGE_FILESYSTEM_PATH must be set for the filesystem storage provider.');
|
|
79
79
|
}
|
|
80
80
|
return new FileSystemProvider(config.storage.filesystemPath);
|
|
81
81
|
case 'supabase':
|
|
82
82
|
if (!config.supabase?.url || !config.supabase?.serviceRoleKey) {
|
|
83
|
-
throw configurationError('SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY must be set for the supabase storage provider.'
|
|
83
|
+
throw configurationError('SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY must be set for the supabase storage provider.');
|
|
84
84
|
}
|
|
85
85
|
if (!deps.supabaseClient) {
|
|
86
|
-
throw configurationError('Supabase client must be provided via deps for the supabase storage provider.'
|
|
86
|
+
throw configurationError('Supabase client must be provided via deps for the supabase storage provider.');
|
|
87
87
|
}
|
|
88
88
|
return new SupabaseProvider(deps.supabaseClient);
|
|
89
89
|
case 'cloudflare-r2':
|
|
@@ -91,31 +91,28 @@ export function createStorageProvider(config, deps = {}) {
|
|
|
91
91
|
if (deps.r2Bucket) {
|
|
92
92
|
return new R2Provider(deps.r2Bucket);
|
|
93
93
|
}
|
|
94
|
-
|
|
95
|
-
return new R2Provider(r2Binding);
|
|
94
|
+
return new R2Provider(getGlobalBinding('R2_BUCKET'));
|
|
96
95
|
}
|
|
97
|
-
throw configurationError('Cloudflare R2 storage is only available in a Cloudflare Worker environment.'
|
|
96
|
+
throw configurationError('Cloudflare R2 storage is only available in a Cloudflare Worker environment.');
|
|
98
97
|
case 'cloudflare-kv':
|
|
99
98
|
if (isServerless()) {
|
|
100
99
|
if (deps.kvNamespace) {
|
|
101
100
|
return new KvProvider(deps.kvNamespace);
|
|
102
101
|
}
|
|
103
|
-
|
|
104
|
-
return new KvProvider(kvBinding);
|
|
102
|
+
return new KvProvider(getGlobalBinding('KV_NAMESPACE'));
|
|
105
103
|
}
|
|
106
|
-
throw configurationError('Cloudflare KV storage is only available in a Cloudflare Worker environment.'
|
|
104
|
+
throw configurationError('Cloudflare KV storage is only available in a Cloudflare Worker environment.');
|
|
107
105
|
case 'cloudflare-d1':
|
|
108
106
|
if (isServerless()) {
|
|
109
107
|
if (deps.d1Database) {
|
|
110
108
|
return new D1Provider(deps.d1Database);
|
|
111
109
|
}
|
|
112
|
-
|
|
113
|
-
return new D1Provider(d1Binding);
|
|
110
|
+
return new D1Provider(getGlobalBinding('DB'));
|
|
114
111
|
}
|
|
115
|
-
throw configurationError('Cloudflare D1 storage is only available in a Cloudflare Worker environment.'
|
|
112
|
+
throw configurationError('Cloudflare D1 storage is only available in a Cloudflare Worker environment.');
|
|
116
113
|
default: {
|
|
117
114
|
const exhaustiveCheck = providerType;
|
|
118
|
-
throw configurationError(`Unhandled storage provider type: ${String(exhaustiveCheck)}
|
|
115
|
+
throw configurationError(`Unhandled storage provider type: ${String(exhaustiveCheck)}`);
|
|
119
116
|
}
|
|
120
117
|
}
|
|
121
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageFactory.js","sourceRoot":"","sources":["../../../src/storage/core/storageFactory.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,UAAU,EAA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J,CAAC;YACD,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QACnD,KAAK,eAAe;YAClB,IAAI,YAAY,EAAE,EAAE,CAAC;gBACnB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;oBAClB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBACvC,CAAC;gBACD,OAAO,IAAI,UAAU,CAAC,gBAAgB,CAAW,WAAW,CAAC,CAAC,CAAC;YACjE,CAAC;YACD,MAAM,kBAAkB,CACtB,6EAA6E,CAC9E,CAAC;QACJ,KAAK,eAAe;YAClB,IAAI,YAAY,EAAE,EAAE,CAAC;gBACnB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;oBACrB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;gBAC1C,CAAC;gBACD,OAAO,IAAI,UAAU,CAAC,gBAAgB,CAAc,cAAc,CAAC,CAAC,CAAC;YACvE,CAAC;YACD,MAAM,kBAAkB,CACtB,6EAA6E,CAC9E,CAAC;QACJ,KAAK,eAAe;YAClB,IAAI,YAAY,EAAE,EAAE,CAAC;gBACnB,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;oBACpB,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBACzC,CAAC;gBACD,OAAO,IAAI,UAAU,CAAC,gBAAgB,CAAa,IAAI,CAAC,CAAC,CAAC;YAC5D,CAAC;YACD,MAAM,kBAAkB,CACtB,6EAA6E,CAC9E,CAAC;QACJ,SAAS,CAAC;YACR,MAAM,eAAe,GAAU,YAAY,CAAC;YAC5C,MAAM,kBAAkB,CAAC,oCAAoC,MAAM,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC;QAC1F,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -11,17 +11,17 @@ import type { ListOptions, StorageOptions } from './IStorageProvider.js';
|
|
|
11
11
|
* - Cannot start or end with special characters
|
|
12
12
|
*
|
|
13
13
|
* @param tenantId The tenant ID to validate.
|
|
14
|
-
* @param
|
|
14
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
15
15
|
* @throws {McpError} JsonRpcErrorCode.InvalidParams - If tenant ID is not a string, empty, too long, contains invalid characters, or has path traversal sequences.
|
|
16
16
|
*/
|
|
17
|
-
export declare function validateTenantId(tenantId: string,
|
|
17
|
+
export declare function validateTenantId(tenantId: string, _context: RequestContext): void;
|
|
18
18
|
/**
|
|
19
19
|
* Validates a storage key.
|
|
20
20
|
* @param key The key to validate.
|
|
21
|
-
* @param
|
|
21
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
22
22
|
* @throws {McpError} JsonRpcErrorCode.ValidationError - If key is not a non-empty string, too long, contains invalid characters, or has path traversal sequences.
|
|
23
23
|
*/
|
|
24
|
-
export declare function validateKey(key: string,
|
|
24
|
+
export declare function validateKey(key: string, _context: RequestContext): void;
|
|
25
25
|
/**
|
|
26
26
|
* Validates a prefix for list operations.
|
|
27
27
|
*
|
|
@@ -32,25 +32,25 @@ export declare function validateKey(key: string, context: RequestContext): void;
|
|
|
32
32
|
* - Only valid path characters allowed
|
|
33
33
|
*
|
|
34
34
|
* @param prefix The prefix to validate (empty string is valid).
|
|
35
|
-
* @param
|
|
35
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
36
36
|
* @throws {McpError} JsonRpcErrorCode.ValidationError - If prefix is not a string, too long, contains invalid characters, or has path traversal sequences.
|
|
37
37
|
*/
|
|
38
|
-
export declare function validatePrefix(prefix: string,
|
|
38
|
+
export declare function validatePrefix(prefix: string, _context: RequestContext): void;
|
|
39
39
|
/**
|
|
40
40
|
* Validates storage options.
|
|
41
41
|
* @param options The storage options to validate.
|
|
42
|
-
* @param
|
|
42
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
43
43
|
* @throws {McpError} JsonRpcErrorCode.ValidationError - If TTL is not a number, negative, or not finite.
|
|
44
44
|
*/
|
|
45
|
-
export declare function validateStorageOptions(options: StorageOptions | undefined,
|
|
45
|
+
export declare function validateStorageOptions(options: StorageOptions | undefined, _context: RequestContext): void;
|
|
46
46
|
/**
|
|
47
47
|
* Validates the shape of a getMany/deleteMany key list before iteration or
|
|
48
48
|
* provider dispatch. Batch size is left to the caller — a server that wants a
|
|
49
49
|
* ceiling applies its own at the tool boundary, where it knows the workload.
|
|
50
50
|
*/
|
|
51
|
-
export declare function validateBatchKeys(keys: unknown, operation: 'deleteMany' | 'getMany',
|
|
51
|
+
export declare function validateBatchKeys(keys: unknown, operation: 'deleteMany' | 'getMany', _context: RequestContext): asserts keys is string[];
|
|
52
52
|
/** Validates the shape of a setMany entry set. Batch size is left to the caller. */
|
|
53
|
-
export declare function validateBatchEntries(entries: unknown,
|
|
53
|
+
export declare function validateBatchEntries(entries: unknown, _context: RequestContext): asserts entries is Map<string, unknown>;
|
|
54
54
|
/**
|
|
55
55
|
* Validates list operation options.
|
|
56
56
|
*
|
|
@@ -60,10 +60,10 @@ export declare function validateBatchEntries(entries: unknown, context: RequestC
|
|
|
60
60
|
* - Prevents memory exhaustion via oversized page requests
|
|
61
61
|
*
|
|
62
62
|
* @param options The list options to validate.
|
|
63
|
-
* @param
|
|
63
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
64
64
|
* @throws {McpError} If the options are invalid.
|
|
65
65
|
*/
|
|
66
|
-
export declare function validateListOptions(options: ListOptions | undefined,
|
|
66
|
+
export declare function validateListOptions(options: ListOptions | undefined, _context: RequestContext): void;
|
|
67
67
|
/**
|
|
68
68
|
* Encodes pagination cursor data into an opaque, HMAC-signed string.
|
|
69
69
|
* @param lastKey The last key from the current page.
|
|
@@ -75,7 +75,7 @@ export declare function encodeCursor(lastKey: string, tenantId: string): string;
|
|
|
75
75
|
* Decodes and validates an opaque, HMAC-signed cursor string.
|
|
76
76
|
* @param cursor The cursor string to decode.
|
|
77
77
|
* @param tenantId The expected tenant ID for validation.
|
|
78
|
-
* @param context The request context for error
|
|
78
|
+
* @param context The caller's request context, for the server-side log of a decode failure. Never copied into the error's `data`, which reaches the client.
|
|
79
79
|
* @returns The last key from the cursor.
|
|
80
80
|
* @throws {McpError} If the cursor is invalid, tampered with, or has a bad signature.
|
|
81
81
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageValidation.d.ts","sourceRoot":"","sources":["../../../src/storage/core/storageValidation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"storageValidation.d.ts","sourceRoot":"","sources":["../../../src/storage/core/storageValidation.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,KAAK,cAAc,EAAa,MAAM,oCAAoC,CAAC;AACpF,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AA2CzE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CA2BjF;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CAqBvE;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,GAAG,IAAI,CA2B7E;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,cAAc,GAAG,SAAS,EACnC,QAAQ,EAAE,cAAc,GACvB,IAAI,CAoBN;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,YAAY,GAAG,SAAS,EACnC,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,IAAI,MAAM,EAAE,CAI1B;AAED,oFAAoF;AACpF,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,cAAc,GACvB,OAAO,CAAC,OAAO,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAIzC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,GAAG,SAAS,EAChC,QAAQ,EAAE,cAAc,GACvB,IAAI,CAwCN;AA0CD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAKtE;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,CAuC9F"}
|
|
@@ -10,7 +10,12 @@
|
|
|
10
10
|
* Security Model:
|
|
11
11
|
* - Defense in depth: validation at service layer AND provider layer
|
|
12
12
|
* - Fail closed: invalid input throws McpError, never coerced
|
|
13
|
-
* -
|
|
13
|
+
* - Client-safe data: a failure's `data` carries only the offending field
|
|
14
|
+
* (`key`, `prefix`, `limit`, `ttl`), never the caller's context — the
|
|
15
|
+
* tenant ID included, since it comes from the context.
|
|
16
|
+
* `data` is returned to the client verbatim, and a handler `ctx` passed as
|
|
17
|
+
* the context carries request metadata and elicited user input (#548). The
|
|
18
|
+
* context reaches the server log through the caller's error path instead.
|
|
14
19
|
* - Immutable: validation functions are pure (no side effects)
|
|
15
20
|
*
|
|
16
21
|
* All validation functions are synchronous and throw McpError on failure.
|
|
@@ -70,66 +75,50 @@ const VALID_KEY_PATTERN = /^[a-zA-Z0-9_.\-/]+$/;
|
|
|
70
75
|
* - Cannot start or end with special characters
|
|
71
76
|
*
|
|
72
77
|
* @param tenantId The tenant ID to validate.
|
|
73
|
-
* @param
|
|
78
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
74
79
|
* @throws {McpError} JsonRpcErrorCode.InvalidParams - If tenant ID is not a string, empty, too long, contains invalid characters, or has path traversal sequences.
|
|
75
80
|
*/
|
|
76
|
-
export function validateTenantId(tenantId,
|
|
81
|
+
export function validateTenantId(tenantId, _context) {
|
|
82
|
+
// No data on any branch: the tenant comes from the request context (a
|
|
83
|
+
// token's `tid` claim, or the transport default), so it belongs in the log
|
|
84
|
+
// the caller's error path writes, not in client-visible data (#548).
|
|
77
85
|
if (typeof tenantId !== 'string') {
|
|
78
|
-
throw invalidParams('Tenant ID must be a string.'
|
|
79
|
-
...context,
|
|
80
|
-
tenantId,
|
|
81
|
-
});
|
|
86
|
+
throw invalidParams('Tenant ID must be a string.');
|
|
82
87
|
}
|
|
83
88
|
const trimmedTenantId = tenantId.trim();
|
|
84
89
|
if (trimmedTenantId.length === 0) {
|
|
85
|
-
throw invalidParams('Tenant ID cannot be an empty string.'
|
|
86
|
-
...context,
|
|
87
|
-
tenantId,
|
|
88
|
-
});
|
|
90
|
+
throw invalidParams('Tenant ID cannot be an empty string.');
|
|
89
91
|
}
|
|
90
92
|
if (trimmedTenantId.length > MAX_TENANT_ID_LENGTH) {
|
|
91
|
-
throw invalidParams(`Tenant ID exceeds maximum length of ${MAX_TENANT_ID_LENGTH} characters
|
|
92
|
-
...context,
|
|
93
|
-
tenantIdLength: trimmedTenantId.length,
|
|
94
|
-
});
|
|
93
|
+
throw invalidParams(`Tenant ID exceeds maximum length of ${MAX_TENANT_ID_LENGTH} characters.`);
|
|
95
94
|
}
|
|
96
95
|
if (!VALID_TENANT_ID_PATTERN.test(trimmedTenantId)) {
|
|
97
|
-
throw invalidParams('Tenant ID contains invalid characters. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Must start and end with alphanumeric characters.'
|
|
96
|
+
throw invalidParams('Tenant ID contains invalid characters. Only alphanumeric characters, hyphens, underscores, and dots are allowed. Must start and end with alphanumeric characters.');
|
|
98
97
|
}
|
|
99
98
|
if (trimmedTenantId.includes('..')) {
|
|
100
|
-
throw invalidParams('Tenant ID contains consecutive dots, which are not allowed.'
|
|
101
|
-
...context,
|
|
102
|
-
tenantId: trimmedTenantId,
|
|
103
|
-
});
|
|
99
|
+
throw invalidParams('Tenant ID contains consecutive dots, which are not allowed.');
|
|
104
100
|
}
|
|
105
101
|
}
|
|
106
102
|
/**
|
|
107
103
|
* Validates a storage key.
|
|
108
104
|
* @param key The key to validate.
|
|
109
|
-
* @param
|
|
105
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
110
106
|
* @throws {McpError} JsonRpcErrorCode.ValidationError - If key is not a non-empty string, too long, contains invalid characters, or has path traversal sequences.
|
|
111
107
|
*/
|
|
112
|
-
export function validateKey(key,
|
|
108
|
+
export function validateKey(key, _context) {
|
|
113
109
|
if (!key || typeof key !== 'string') {
|
|
114
|
-
throw validationError('Key must be a non-empty string.', {
|
|
115
|
-
...context,
|
|
116
|
-
key,
|
|
117
|
-
});
|
|
110
|
+
throw validationError('Key must be a non-empty string.', { key });
|
|
118
111
|
}
|
|
119
112
|
if (key.length > MAX_KEY_LENGTH) {
|
|
120
113
|
throw validationError(`Key exceeds maximum length of ${MAX_KEY_LENGTH} characters.`, {
|
|
121
|
-
...context,
|
|
122
114
|
key: `${key.substring(0, 50)}...`,
|
|
123
115
|
});
|
|
124
116
|
}
|
|
125
117
|
if (!VALID_KEY_PATTERN.test(key)) {
|
|
126
|
-
throw validationError('Key contains invalid characters. Only alphanumeric, hyphens, underscores, dots, and slashes are allowed.', {
|
|
118
|
+
throw validationError('Key contains invalid characters. Only alphanumeric, hyphens, underscores, dots, and slashes are allowed.', { key });
|
|
127
119
|
}
|
|
128
120
|
if (key.includes('..')) {
|
|
129
|
-
throw validationError('Key must not contain ".." (path traversal attempt).', {
|
|
130
|
-
...context,
|
|
131
|
-
key,
|
|
132
|
-
});
|
|
121
|
+
throw validationError('Key must not contain ".." (path traversal attempt).', { key });
|
|
133
122
|
}
|
|
134
123
|
}
|
|
135
124
|
/**
|
|
@@ -142,16 +131,12 @@ export function validateKey(key, context) {
|
|
|
142
131
|
* - Only valid path characters allowed
|
|
143
132
|
*
|
|
144
133
|
* @param prefix The prefix to validate (empty string is valid).
|
|
145
|
-
* @param
|
|
134
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
146
135
|
* @throws {McpError} JsonRpcErrorCode.ValidationError - If prefix is not a string, too long, contains invalid characters, or has path traversal sequences.
|
|
147
136
|
*/
|
|
148
|
-
export function validatePrefix(prefix,
|
|
137
|
+
export function validatePrefix(prefix, _context) {
|
|
149
138
|
if (typeof prefix !== 'string') {
|
|
150
|
-
throw validationError('Prefix must be a string.', {
|
|
151
|
-
...context,
|
|
152
|
-
operation: 'validatePrefix',
|
|
153
|
-
prefix,
|
|
154
|
-
});
|
|
139
|
+
throw validationError('Prefix must be a string.', { prefix });
|
|
155
140
|
}
|
|
156
141
|
// Empty prefix is valid (matches all keys)
|
|
157
142
|
if (prefix === '') {
|
|
@@ -159,55 +144,38 @@ export function validatePrefix(prefix, context) {
|
|
|
159
144
|
}
|
|
160
145
|
if (prefix.length > MAX_PREFIX_LENGTH) {
|
|
161
146
|
throw validationError(`Prefix exceeds maximum length of ${MAX_PREFIX_LENGTH} characters.`, {
|
|
162
|
-
...context,
|
|
163
|
-
operation: 'validatePrefix',
|
|
164
147
|
prefix: `${prefix.substring(0, 50)}...`,
|
|
165
148
|
});
|
|
166
149
|
}
|
|
167
150
|
// Only validate pattern if non-empty
|
|
168
151
|
if (!VALID_KEY_PATTERN.test(prefix)) {
|
|
169
|
-
throw validationError('Prefix contains invalid characters. Only alphanumeric, hyphens, underscores, dots, and slashes are allowed.', {
|
|
170
|
-
...context,
|
|
171
|
-
operation: 'validatePrefix',
|
|
172
|
-
prefix: prefix.length > 50 ? `${prefix.substring(0, 50)}...` : prefix,
|
|
173
|
-
});
|
|
152
|
+
throw validationError('Prefix contains invalid characters. Only alphanumeric, hyphens, underscores, dots, and slashes are allowed.', { prefix: prefix.length > 50 ? `${prefix.substring(0, 50)}...` : prefix });
|
|
174
153
|
}
|
|
175
154
|
if (prefix.includes('..')) {
|
|
176
|
-
throw validationError('Prefix must not contain ".." (path traversal attempt).', {
|
|
177
|
-
...context,
|
|
178
|
-
operation: 'validatePrefix',
|
|
179
|
-
prefix,
|
|
180
|
-
});
|
|
155
|
+
throw validationError('Prefix must not contain ".." (path traversal attempt).', { prefix });
|
|
181
156
|
}
|
|
182
157
|
}
|
|
183
158
|
/**
|
|
184
159
|
* Validates storage options.
|
|
185
160
|
* @param options The storage options to validate.
|
|
186
|
-
* @param
|
|
161
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
187
162
|
* @throws {McpError} JsonRpcErrorCode.ValidationError - If TTL is not a number, negative, or not finite.
|
|
188
163
|
*/
|
|
189
|
-
export function validateStorageOptions(options,
|
|
164
|
+
export function validateStorageOptions(options, _context) {
|
|
190
165
|
if (!options) {
|
|
191
166
|
return;
|
|
192
167
|
}
|
|
193
168
|
if (options.ttl !== undefined) {
|
|
194
169
|
if (typeof options.ttl !== 'number') {
|
|
195
|
-
throw validationError('TTL must be a number (seconds).', {
|
|
196
|
-
...context,
|
|
197
|
-
ttl: options.ttl,
|
|
198
|
-
});
|
|
170
|
+
throw validationError('TTL must be a number (seconds).', { ttl: options.ttl });
|
|
199
171
|
}
|
|
200
172
|
if (options.ttl < 0) {
|
|
201
173
|
throw validationError('TTL must be a non-negative number. Use 0 for immediate expiration.', {
|
|
202
|
-
...context,
|
|
203
174
|
ttl: options.ttl,
|
|
204
175
|
});
|
|
205
176
|
}
|
|
206
177
|
if (!Number.isFinite(options.ttl)) {
|
|
207
|
-
throw validationError('TTL must be a finite number.', {
|
|
208
|
-
...context,
|
|
209
|
-
ttl: options.ttl,
|
|
210
|
-
});
|
|
178
|
+
throw validationError('TTL must be a finite number.', { ttl: options.ttl });
|
|
211
179
|
}
|
|
212
180
|
}
|
|
213
181
|
}
|
|
@@ -216,21 +184,15 @@ export function validateStorageOptions(options, context) {
|
|
|
216
184
|
* provider dispatch. Batch size is left to the caller — a server that wants a
|
|
217
185
|
* ceiling applies its own at the tool boundary, where it knows the workload.
|
|
218
186
|
*/
|
|
219
|
-
export function validateBatchKeys(keys, operation,
|
|
187
|
+
export function validateBatchKeys(keys, operation, _context) {
|
|
220
188
|
if (!Array.isArray(keys)) {
|
|
221
|
-
throw validationError(`${operation} keys must be an array
|
|
222
|
-
...context,
|
|
223
|
-
operation: `validateBatchKeys.${operation}`,
|
|
224
|
-
});
|
|
189
|
+
throw validationError(`${operation} keys must be an array.`);
|
|
225
190
|
}
|
|
226
191
|
}
|
|
227
192
|
/** Validates the shape of a setMany entry set. Batch size is left to the caller. */
|
|
228
|
-
export function validateBatchEntries(entries,
|
|
193
|
+
export function validateBatchEntries(entries, _context) {
|
|
229
194
|
if (!(entries instanceof Map)) {
|
|
230
|
-
throw validationError('setMany entries must be a Map.'
|
|
231
|
-
...context,
|
|
232
|
-
operation: 'validateBatchEntries.setMany',
|
|
233
|
-
});
|
|
195
|
+
throw validationError('setMany entries must be a Map.');
|
|
234
196
|
}
|
|
235
197
|
}
|
|
236
198
|
/**
|
|
@@ -242,63 +204,40 @@ export function validateBatchEntries(entries, context) {
|
|
|
242
204
|
* - Prevents memory exhaustion via oversized page requests
|
|
243
205
|
*
|
|
244
206
|
* @param options The list options to validate.
|
|
245
|
-
* @param
|
|
207
|
+
* @param _context The caller's request context. Never copied into the error's `data`, which reaches the client.
|
|
246
208
|
* @throws {McpError} If the options are invalid.
|
|
247
209
|
*/
|
|
248
|
-
export function validateListOptions(options,
|
|
210
|
+
export function validateListOptions(options, _context) {
|
|
249
211
|
if (!options) {
|
|
250
212
|
return;
|
|
251
213
|
}
|
|
252
214
|
if (options.limit !== undefined) {
|
|
253
215
|
if (typeof options.limit !== 'number') {
|
|
254
|
-
throw validationError('List limit must be a number.', {
|
|
255
|
-
...context,
|
|
256
|
-
operation: 'validateListOptions',
|
|
257
|
-
limit: options.limit,
|
|
258
|
-
});
|
|
216
|
+
throw validationError('List limit must be a number.', { limit: options.limit });
|
|
259
217
|
}
|
|
260
218
|
if (!Number.isInteger(options.limit)) {
|
|
261
|
-
throw validationError('List limit must be an integer.', {
|
|
262
|
-
...context,
|
|
263
|
-
operation: 'validateListOptions',
|
|
264
|
-
limit: options.limit,
|
|
265
|
-
});
|
|
219
|
+
throw validationError('List limit must be an integer.', { limit: options.limit });
|
|
266
220
|
}
|
|
267
221
|
if (options.limit < 1) {
|
|
268
|
-
throw validationError('List limit must be at least 1.', {
|
|
269
|
-
...context,
|
|
270
|
-
operation: 'validateListOptions',
|
|
271
|
-
limit: options.limit,
|
|
272
|
-
});
|
|
222
|
+
throw validationError('List limit must be at least 1.', { limit: options.limit });
|
|
273
223
|
}
|
|
274
224
|
if (options.limit > MAX_LIST_LIMIT) {
|
|
275
225
|
throw validationError(`List limit exceeds maximum of ${MAX_LIST_LIMIT}.`, {
|
|
276
|
-
...context,
|
|
277
|
-
operation: 'validateListOptions',
|
|
278
226
|
limit: options.limit,
|
|
279
227
|
});
|
|
280
228
|
}
|
|
281
229
|
}
|
|
282
230
|
if (options.cursor !== undefined) {
|
|
283
231
|
if (typeof options.cursor !== 'string') {
|
|
284
|
-
throw validationError('Cursor must be a string.'
|
|
285
|
-
...context,
|
|
286
|
-
operation: 'validateListOptions',
|
|
287
|
-
});
|
|
232
|
+
throw validationError('Cursor must be a string.');
|
|
288
233
|
}
|
|
289
234
|
if (options.cursor.trim() === '') {
|
|
290
|
-
throw validationError('Cursor must not be an empty string.'
|
|
291
|
-
...context,
|
|
292
|
-
operation: 'validateListOptions',
|
|
293
|
-
});
|
|
235
|
+
throw validationError('Cursor must not be an empty string.');
|
|
294
236
|
}
|
|
295
237
|
// Basic format validation: base64 chars plus '.' separator (payload.signature)
|
|
296
238
|
// More thorough HMAC verification happens in decodeCursor
|
|
297
239
|
if (!/^[A-Za-z0-9+/=.]+$/.test(options.cursor)) {
|
|
298
|
-
throw validationError('Cursor contains invalid characters.'
|
|
299
|
-
...context,
|
|
300
|
-
operation: 'validateListOptions',
|
|
301
|
-
});
|
|
240
|
+
throw validationError('Cursor contains invalid characters.');
|
|
302
241
|
}
|
|
303
242
|
}
|
|
304
243
|
}
|
|
@@ -348,7 +287,7 @@ export function encodeCursor(lastKey, tenantId) {
|
|
|
348
287
|
* Decodes and validates an opaque, HMAC-signed cursor string.
|
|
349
288
|
* @param cursor The cursor string to decode.
|
|
350
289
|
* @param tenantId The expected tenant ID for validation.
|
|
351
|
-
* @param context The request context for error
|
|
290
|
+
* @param context The caller's request context, for the server-side log of a decode failure. Never copied into the error's `data`, which reaches the client.
|
|
352
291
|
* @returns The last key from the cursor.
|
|
353
292
|
* @throws {McpError} If the cursor is invalid, tampered with, or has a bad signature.
|
|
354
293
|
*/
|
|
@@ -356,32 +295,20 @@ export function decodeCursor(cursor, tenantId, context) {
|
|
|
356
295
|
try {
|
|
357
296
|
const dotIndex = cursor.lastIndexOf('.');
|
|
358
297
|
if (dotIndex === -1) {
|
|
359
|
-
throw invalidParams('Invalid cursor format: missing signature.'
|
|
360
|
-
...context,
|
|
361
|
-
operation: 'decodeCursor',
|
|
362
|
-
});
|
|
298
|
+
throw invalidParams('Invalid cursor format: missing signature.');
|
|
363
299
|
}
|
|
364
300
|
const payload = cursor.substring(0, dotIndex);
|
|
365
301
|
const signature = cursor.substring(dotIndex + 1);
|
|
366
302
|
if (!verifyCursorSignature(payload, signature)) {
|
|
367
|
-
throw invalidParams('Cursor signature verification failed. The cursor may be expired (e.g. server restart or isolate change) or tampered with.'
|
|
368
|
-
...context,
|
|
369
|
-
operation: 'decodeCursor',
|
|
370
|
-
});
|
|
303
|
+
throw invalidParams('Cursor signature verification failed. The cursor may be expired (e.g. server restart or isolate change) or tampered with.');
|
|
371
304
|
}
|
|
372
305
|
const decoded = base64ToString(payload);
|
|
373
306
|
const data = JSON.parse(decoded);
|
|
374
307
|
if (!data || typeof data !== 'object' || !('k' in data) || !('t' in data)) {
|
|
375
|
-
throw invalidParams('Invalid cursor format.'
|
|
376
|
-
...context,
|
|
377
|
-
operation: 'decodeCursor',
|
|
378
|
-
});
|
|
308
|
+
throw invalidParams('Invalid cursor format.');
|
|
379
309
|
}
|
|
380
310
|
if (data.t !== tenantId) {
|
|
381
|
-
throw invalidParams('Cursor tenant ID mismatch. Cursor may have been tampered with.'
|
|
382
|
-
...context,
|
|
383
|
-
operation: 'decodeCursor',
|
|
384
|
-
});
|
|
311
|
+
throw invalidParams('Cursor tenant ID mismatch. Cursor may have been tampered with.');
|
|
385
312
|
}
|
|
386
313
|
return data.k;
|
|
387
314
|
}
|
|
@@ -389,15 +316,12 @@ export function decodeCursor(cursor, tenantId, context) {
|
|
|
389
316
|
if (error instanceof McpError) {
|
|
390
317
|
throw error;
|
|
391
318
|
}
|
|
392
|
-
// Stack
|
|
319
|
+
// Stack and context stay in the server log; McpError.data is wire-visible.
|
|
393
320
|
logger.warning('Failed to decode cursor', {
|
|
394
321
|
...withExtra(context, { error: error instanceof Error ? error.stack : String(error) }),
|
|
395
322
|
operation: 'decodeCursor',
|
|
396
323
|
});
|
|
397
|
-
throw invalidParams('Failed to decode cursor. Cursor may be corrupted or invalid.'
|
|
398
|
-
...context,
|
|
399
|
-
operation: 'decodeCursor',
|
|
400
|
-
});
|
|
324
|
+
throw invalidParams('Failed to decode cursor. Cursor may be corrupted or invalid.');
|
|
401
325
|
}
|
|
402
326
|
}
|
|
403
327
|
//# sourceMappingURL=storageValidation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storageValidation.js","sourceRoot":"","sources":["../../../src/storage/core/storageValidation.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"storageValidation.js","sourceRoot":"","sources":["../../../src/storage/core/storageValidation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEvE,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC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