export const mcpUpdateResourceDependencyDeclarations = [
    { dependencyId: "runtime.execEngine.mcp.updateResource", kind: "service", required: true, description: "Runtime-owned MCP resource update support. BaseTool shapes content/revision semantics and never writes resources directly." },
    { dependencyId: "runtime.governancePlane.mcpApproval", kind: "permission", required: true, description: "dryRun:false requires explicit runtime guard approval before resource update." },
    { dependencyId: "runtime.mcp.resourceLifecycle", kind: "runtime", required: true, description: "Resource persistence, revision conflicts, transports, and cleanup remain with runtime." },
];
export function createHostExecutorMcpUpdateResourceProvider(executor) {
    const updateResource = executor?.mcp?.updateResource;
    if (updateResource === undefined)
        return undefined;
    return async (request, context) => {
        const result = await updateResource({ ...request, context });
        if (!result.ok)
            throw new Error(result.error.message);
        return result.output;
    };
}
