This commit is contained in:
1 parent
d5022d2d59
commit
cd2394dd22
19 files changed
+1757
-32
No files matched your search
+2
-1
@@ -25,7 +25,8 @@ class McpStore {
|
||||
if (typeof value.enabled !== 'boolean' || typeof value.name !== 'string' || !value.name.trim() || value.name.length > 100
|
||||
|| value.capabilities.some(item => !CAPABILITIES.includes(item)) || value.grants.length > 30 || value.revocations.length > 32
|
||||
|| value.grants.some(grant => !grant || typeof grant.id !== 'string' || typeof grant.path !== 'string' || !path.isAbsolute(grant.path)
|
||||
|| typeof grant.label !== 'string' || typeof grant.readOnly !== 'boolean')) throw new Error('format');
|
||||
|| typeof grant.label !== 'string' || typeof grant.readOnly !== 'boolean'
|
||||
|| (grant.allowTransfer !== undefined && typeof grant.allowTransfer !== 'boolean'))) throw new Error('format');
|
||||
const decode = identity => {
|
||||
if (!identity) return null;
|
||||
if (identity.relayUrl !== RELAY_URL || !/^[a-f0-9-]{36}$/.test(identity.installationId)) throw new Error('identity');
|
||||
|
||||
Reference in new issue
Block a user