feat(plugins): move game resources behind marketplace

This commit is contained in:
2026-08-31 10:45:20 +08:00
parent 62304dc85b
commit fe656dd865
33 changed files with 1413 additions and 1018 deletions

View File

@@ -772,7 +772,9 @@ function parseV2Tool(
fail(filePath, `tools[${index}].mutation`, 'unknown tool mutation');
}
const projectWriteLease = bool(tool.projectWriteLease, filePath, `tools[${index}].projectWriteLease`);
if (projectWriteLease) fail(filePath, `tools[${index}].projectWriteLease`, 'distributed tools cannot request a project write lease');
if (projectWriteLease && tool.mutation === 'read') {
fail(filePath, `tools[${index}].projectWriteLease`, 'read-only tools cannot request a project write lease');
}
const permissions = uniqueStrings(
tool.permissions,
filePath,
@@ -804,7 +806,7 @@ function parseV2Tool(
operation,
roles: ['parent'],
mutation: mutation as PluginToolMutation,
projectWriteLease: false,
projectWriteLease,
permissions,
executionMode: tool.executionMode as CodingPluginExecutionMode,
inputSchema: freezeDeep(structuredClone(inputSchema)),