feat(registry): 收录需选择数据目录的 Repomix 和 Excel MCP

This commit is contained in:
yige committed 2026-11-30 14:53:59 +08:00
1 parent 91d6e6beeb
commit d76eedc406
16 files changed
+459 -8

No files matched your search

+29
View File
@@ -8,3 +8,32 @@ export function isAuthoredRegistryEntry(entry) {
export function isApplicationEntry(entry) {
return ['docker-app', 'native-app', 'artifact', 'web-bundle'].includes(entry?.type)
}
/** Add the scoped MCP connection contract without replacing the published schema fingerprint. */
export function withMcpDataDirectory(schema) {
const connection = schema?.definitions?.connection
if (!connection?.properties) return schema
return {
...schema,
definitions: {
...schema.definitions,
connection: {
...connection,
properties: {
...connection.properties,
requiresDataDirectory: {
const: true,
description: 'Require the user-selected data folder as the stdio working directory.',
},
},
allOf: [
...(connection.allOf ?? []),
{
if: { required: ['requiresDataDirectory'] },
then: { properties: { transport: { const: 'stdio' } } },
},
],
},
},
}
}