Repository: mastra-ai/mastra
File: workspaces/gcs/src/filesystem/index.ts (TypeScript)

Code before:
  '.jpg': 'image/jpeg',
  '.jpeg': 'image/jpeg',
  '.gif': 'image/gif',
  '.svg': 'image/svg+xml',
  '.webp': 'image/webp',
  '.ico': 'image/x-icon',
  // Documents
  '.pdf': 'application/pdf',
  // Archives
  '.zip': 'application/zip',
  '.gz': 'application/gzip',
  '.tar': 'application/x-tar',
};

/**
 * Get MIME type from file path extension.
 */
function getMimeType(path: string): string {
  const ext = path.toLowerCase().match(/\.[^.]+$/)?.[0];
  return ext ? (MIME_TYPES[ext] ?? 'application/octet-stream') : 'application/octet-stream';
}

/**
 * GCS filesystem provider configuration.
 */
export interface GCSFilesystemOptions extends Omit<MastraFilesystemOptions, 'name'> {
  /** Unique identifier for this filesystem instance */
  id?: string;
  /** GCS bucket name */
  bucket: string;
  /** Human-friendly display name for the UI */
  displayName?: string;
  /** Icon identifier for the UI (defaults to 'gcs') */
  icon?: FilesystemIcon;
  /** Description shown in tooltips */
  description?: string;
  /**
   * GCS project ID.
   * Required when using service account credentials.
   */
  projectId?: string;
  /**
   * Service account key JSON object or path to key file.
   * If not provided, uses Application Default Credentials (ADC).
   */
  credentials?: object | string;
  /** Optional prefix for all keys (acts like a subdirectory) */
  prefix?: string;
  /** Mount as read-only (blocks write operations, mounts read-only in sandboxes) */
  readOnly?: boolean;
  /**

Review comment (suggestion):
```suggestion
export interface GCSFilesystemOptions extends MastraFilesystemOptions {
```

Code after:
  '.jpg': 'image/jpeg',
  '.jpeg': 'image/jpeg',
  '.gif': 'image/gif',
  '.svg': 'image/svg+xml',
  '.webp': 'image/webp',
  '.ico': 'image/x-icon',
  // Documents
  '.pdf': 'application/pdf',
  // Archives
  '.zip': 'application/zip',
  '.gz': 'application/gzip',
  '.tar': 'application/x-tar',
};

/**
 * Get MIME type from file path extension.
 */
function getMimeType(path: string): string {
  const ext = path.toLowerCase().match(/\.[^.]+$/)?.[0];
  return ext ? (MIME_TYPES[ext] ?? 'application/octet-stream') : 'application/octet-stream';
}

/**
 * GCS filesystem provider configuration.
 */
export interface GCSFilesystemOptions extends MastraFilesystemOptions {
  /** Unique identifier for this filesystem instance */
  id?: string;
  /** GCS bucket name */
  bucket: string;
  /** Human-friendly display name for the UI */
  displayName?: string;
  /** Icon identifier for the UI (defaults to 'gcs') */
  icon?: FilesystemIcon;
  /** Description shown in tooltips */
  description?: string;
  /**
   * GCS project ID.
   * Required when using service account credentials.
   */
  projectId?: string;
  /**
   * Service account key JSON object or path to key file.
   * If not provided, uses Application Default Credentials (ADC).
   */
  credentials?: object | string;
  /** Optional prefix for all keys (acts like a subdirectory) */
  prefix?: string;
  /** Mount as read-only (blocks write operations, mounts read-only in sandboxes) */
  readOnly?: boolean;
  /**