Zarr client

@honua/sdk-js/zarr is an experimental client for Honua Server's versioned Zarr registration and tile-serving contract. It reuses an existing HonuaClient, so API keys, bearer tokens, cancellation, retry policy, timeout, and request interceptors remain active.

import { HonuaClient } from "@honua/sdk-js/honua";
import { createZarrClient } from "@honua/sdk-js/zarr";

const client = new HonuaClient({
  baseUrl: "https://your-honua-server.example",
  apiKey: process.env.HONUA_API_KEY,
});
const zarr = createZarrClient(client);

const registered = await zarr.register({
  layerId: 7,
  name: "Daily temperature",
  provider: "AwsS3",
  bucket: "coverage-data",
  rootPath: "temperature/daily.zarr",
});

const scanned = await zarr.refresh(registered.id);
// Supply the extent advertised by the associated layer/coverage metadata. The
// registration summary does not expose the scanned store extent itself.
const readiness = {
  storageExtent: [-180, -90, 180, 90] as const,
  tileMatrixSrid: 4326,
  variable: scanned.primaryVariable ?? undefined,
};
const status = zarr.assess(scanned, readiness);
if (status.serverTileHandoff !== "ready") {
  throw new Error(status.failures.map((failure) => failure.message).join("; "));
}

const tile = await zarr.tile({
  layerId: scanned.layerId,
  tileMatrixSetId: "WorldCRS84Quad",
  z: 3,
  x: 2,
  y: 4,
  variable: readiness.variable,
  datetime: "2026-08-13T00:00:00Z",
  maxResponseBytes: 2 * 1024 * 1024,
});

Contract and limits

This slice does not fetch chunks directly from S3, Azure Blob Storage, or the local filesystem. directObjectStoreRead therefore remains "unavailable". Use the server tile operation or the existing OGC API Coverages/WCS client for bounded subsets. The API remains experimental until cross-deployment evidence is stable.