Adapter

Google Cloud Storage

Overview

The Google Cloud Storage adapter creates sibling buckets for snapshots and forks (globally unique names, populated by server-side copy). Manifest lives at .storagesdk.metadata.json at the bucket root.

Siblings are colocated in the parent’s location via bucket.getMetadata().location.

Configuration

import { Storage } from '@storagesdk/core';
import { gcs } from '@storagesdk/adapters/gcs';

const storage = new Storage({
  adapter: gcs({
    bucket: 'agent-runs',
    projectId: process.env.GOOGLE_PROJECT_ID,
    keyFilename: process.env.GOOGLE_APPLICATION_CREDENTIALS,
  }),
});
gcs({
  bucket: string;
  projectId: string;
  credentials?: { client_email: string; private_key: string };
  keyFilename?: string;
  apiEndpoint?: string;    // override for fake-gcs-server local emulation
});

Notes

Compatibility

CapabilitySupport
SnapshotsSibling buckets via server-side copy
ForksSibling buckets via server-side copy
Byte-range reads
Multipart upload
Enforced upload limits
User metadata
Signed URLs