Check SDK service capabilities

Use seige.capabilities() to check whether a Seige service supports an integration before offering it in your app. Discovery does not open sign-in, load encryption keys or ask for access. It returns the usual { data, error } result.

import { createSeige } from "@seige_sdk/sdk";

const seige = createSeige({ appName: "My app" });
const { data, error } = await seige.capabilities();

if (error) {
  console.warn(error.code, error.message, error.hint);
} else {
  console.log(data.familySharing, data.calendar);
}

Interpret support separately from permission

Each capability is null when unsupported or an object such as { version: 1 } when this SDK understands the supported contract. Support does not mean that the user has granted permission. An integration still needs its own consent and resource selection.

SDK 0.7.0 provides households and shared APIs. Deployments with the shared workspace service report familySharing: { version: 1 }; older deployments report null. Calendar remains unavailable (calendar: null) and has no browser client. See Share a family workspace for consent, publication and recovery. Existing personal database, file and AI workflows continue to use their existing APIs.

Handle errors and cancellation

An older deployment without a discovery endpoint returns unsupported capabilities. An unreachable service or temporary server failure returns an error; do not interpret it as proof that a capability is unsupported. Offer a retry when the feature is needed.

Pass { signal: controller.signal } to cancel discovery when leaving the view. Discovery sends no account credentials and does not cache the response.

This guide is also available as Markdown for coding agents.