--- title: "Entry points" description: "Every import path of the @darkgrade/slate package and what each exports: the camera API, controls, runtime, MCP server, protocol access, the CLI and telemetry." url: https://darkgrade.com/docs/slate/reference/entry-points last_updated: 2026-12-04 docs_index: https://darkgrade.com/docs/llms.txt --- # Entry points > Every import path of the @darkgrade/slate package and what each exports: the camera API, controls, runtime, MCP server, protocol access, the CLI and telemetry. > ## Documentation Index > Fetch the complete documentation index at: https://darkgrade.com/docs/llms.txt > Use this file to discover all available pages before exploring further. Slate is one package with several import paths. Most code needs only the first: `Camera` and its types. The others are for a browser page that draws controls, a host that shares one camera between callers, an MCP server, raw protocol work, and the `darkgrade` command inside another executable. ```typescript import { Camera } from '@darkgrade/slate' ``` | Import path | For | | - | - | | [`@darkgrade/slate`](#darkgradeslate) | The camera API: [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md), its option and result types, its errors, and the workflows built on it (a multi-camera video take, shot analysis, power assessment). | | [`@darkgrade/slate/cli`](#darkgradeslatecli) | The `darkgrade` command as a function, for an executable that embeds it. | | [`@darkgrade/slate/controls`](#darkgradeslatecontrols) | The setting vocabulary and value conversions without any driver or USB code, for a browser page that draws controls. | | [`@darkgrade/slate/protocol`](#darkgradeslateprotocol) | Raw PTP access, the vendor drivers, the registries of operations, properties and events, PTP/IP and wireless pairing. | | [`@darkgrade/slate/runtime`](#darkgradeslateruntime) | What a host embeds to share one camera between several callers: `CameraRuntime` with its per-camera queue, the operation list the MCP tools and the CLI are generated from, and cross-process ownership (`HardwareCoordinator`). | | [`@darkgrade/slate/runtime/browser`](#darkgradeslateruntimebrowser) | The runtime without any Node import: everything in `./runtime` except cross-process ownership. | | [`@darkgrade/slate/runtime/mcp`](#darkgradeslateruntimemcp) | The MCP server: one `camera_` tool per public Camera operation, generated from the same list. | | [`@darkgrade/slate/runtime/ownership`](#darkgradeslateruntimeownership) | Cross-process camera ownership with leases and heartbeats, for a host with more than one process. | | [`@darkgrade/slate/telemetry`](#darkgradeslatetelemetry) | Diagnostics sharing for an application that embeds Slate: one shared queue per process. | | [`@darkgrade/slate/telemetry/batch`](#darkgradeslatetelemetrybatch) | The batch a client uploads, and its validation. | | [`@darkgrade/slate/telemetry/installation-store`](#darkgradeslatetelemetryinstallation-store) | A file store for the installation state. | | [`@darkgrade/slate/telemetry/protocol`](#darkgradeslatetelemetryprotocol) | The protocol evidence a diagnostic entry can carry, and its validation. | | [`@darkgrade/slate/telemetry/schema`](#darkgradeslatetelemetryschema) | The diagnostic entry schema, its limits and its validation. | | [`@darkgrade/slate/telemetry/settings`](#darkgradeslatetelemetrysettings) | Where Node keeps the sharing preference and saved diagnostics, and the shared Node queue. | | [`@darkgrade/slate/telemetry/server`](#darkgradeslatetelemetryserver) | The collector. | | [`@darkgrade/slate/telemetry/postgres`](#darkgradeslatetelemetrypostgres) | The collector's Postgres database. | Slate needs Node 22.18 or later. `@modelcontextprotocol/server`, `zod` and `pg` are optional peer dependencies, needed only by the entry points that name them below. ## @darkgrade/slate packages/slate/src/index.ts The camera API: [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md), its option and result types, its errors, and the workflows built on it (a multi-camera video take, shot analysis, power assessment). ```typescript import { Camera } from '@darkgrade/slate' ``` Guide: [Quickstart](https://darkgrade.com/docs/slate/getting_started/quickstart.md) ### Classes (14) | Export | What it is | | - | - | | [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md) | One camera, the same on every body that supports an operation. | | [`CameraClipNotFoundError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraclipnotfounderror) | The camera confirmed it stopped recording, but no new finished clip appeared on the card in time. | | [`CameraConfirmationError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraconfirmationerror) | An acknowledged request whose fresh camera observation did not confirm the requested state. | | [`CameraOutcomeUnknownError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraoutcomeunknownerror) | The command was sent but its result could not be confirmed. | | [`CameraRefusedError`](https://darkgrade.com/docs/slate/reference/errors.md#camerarefusederror) | The camera said no, or the value is not one it offers now. | | [`CameraUnsupportedError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraunsupportederror) | This camera cannot do it right now; [`getCapabilities()`](https://darkgrade.com/docs/slate/getting_started/camera.md#getcapabilities) says why. | | [`PTPDecodeError`](https://darkgrade.com/docs/slate/reference/errors.md#ptpdecodeerror) | A dataset arrived intact at the container level but could not be decoded. | | [`PTPDisconnectedError`](https://darkgrade.com/docs/slate/reference/errors.md#ptpdisconnectederror) | The transport is gone (cable pulled, camera powered off, socket closed). | | [`PTPError`](https://darkgrade.com/docs/slate/reference/errors.md#ptperror) | The base class of every protocol failure. | | [`PTPProtocolError`](https://darkgrade.com/docs/slate/reference/errors.md#ptpprotocolerror) | The camera answered with bytes that break ISO 15740 container framing for this transaction. | | [`PTPRecoveryRequiredError`](https://darkgrade.com/docs/slate/reference/errors.md#ptprecoveryrequirederror) | The pipe may still contain an abandoned transaction and the automatic USB reset failed, or the transport has none (PTP/IP). | | [`PTPResponseError`](https://darkgrade.com/docs/slate/reference/errors.md#ptpresponseerror) | The camera answered a transaction with a response code the caller cannot continue from. | | [`PTPTimeoutError`](https://darkgrade.com/docs/slate/reference/errors.md#ptptimeouterror) | A transport phase did not complete in time. | | `VideoTake` | Device-independent take lifecycle shared by applications and MCP. | ### Functions (25) | Export | What it is | | - | - | | `analyseShot()` | Measures a picture's exposure, focus detail and colour, optionally with a vision-model review of the subject, as a [`ShotAnalysis`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotanalysis). | | `assessCameraPower()` | Whether the battery lasts a planned recording with a reserve (5 minutes unless given), from the camera's own runtime estimate, never from the percentage. | | `cameraControlContract()` | Each qualification setting from one read of the controls: whether it is present and writable, its value and its choices. | | `chooseIso()` | The ISO among the values the camera offers that best corrects the analysed exposure; `undefined` when none applies or it is already set. | | `chooseShutterSpeed()` | Choose the closest advertised shutter to a 180-degree shutter angle. | | `configureSlateTelemetry()` | Sets the diagnostics client Slate reports to, or clears it with `undefined`. A browser application supplies its own persistent store this way. | | `describeShot()` | Reads [`ShotMetrics`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotmetrics) as words: exposure `balanced`, `bright` or `dark`; focus `detail-visible` or `soft`; colour `neutral`, `cast` or `unknown`. | | `exifIso()` | Read standard EXIF ISO, so locking Auto ISO preserves the camera's metered exposure. | | `exposureSeconds()` | An exposure time in seconds. An angle needs `context.framesPerSecond`; a named value such as Bulb gives `undefined`. | | `identifyCamera()` | Resolves USB identity without opening a device or starting any service. | | `isValidatedModel()` | Whether a model name is in `validatedCameraModels`, ignoring case and extra spaces. | | `isVerifiedFeature()` | Whether a vendor feature is confirmed on that model in `verifiedFeatureModels`. | | `matchExposureTime()` | Match an actual advertised value; do not round to a nearby camera setting. | | `measureShot()` | Measures RGB pixels (three bytes each, `width` by `height`) into [`ShotMetrics`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotmetrics). | | `normalizeCameraPower()` | Normalize documented units; preserve unsupported/sentinel values as raw evidence. | | `observeCameraEvents()` | Counts the events a protocol session delivers during an operation, by code and name. | | `optimiseShot()` | Sets a shot up from a picture within a time budget: chooses among the values the camera offers, applies them through your callback and reports each change as a [`ShotSetupReport`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotsetupreport). | | `parseExposureTime()` | Reads text such as `1/250`, `0.5"`, `180°` or `bulb`, or an [`ExposureTime`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretime) object, into an `ExposureTime`. Throws on input it cannot read. | | `qualifyCameraSetting()` | Writes one setting to a value the camera offers, reads it back and restores the original, also after a failed or ambiguous write. The caller owns the camera throughout. | | `readCameraPower()` | Reuse an owned camera session for battery telemetry over USB or Sony SDK Wi-Fi. | | `readStandardCameraPower()` | Read one standard battery descriptor on an already-owned PTP session. | | `recordFirstContact()` | Bodies outside the validated list get one bounded, read-only inventory (identity, every advertised property descriptor, storage IDs) recorded as a `first-contact` profile. | | `resolveCameraControl()` | The setting id for a name or alias, ignoring case, spaces, hyphens and underscores; `undefined` when none matches. | | `runBenchmark()` | Reads a connected, idle camera's full advertised inventory and a bounded number of numeric property descriptors, and reports each check. | | `subjectFocusVerified()` | Whether focus on the subject is verified: the camera confirmed focus, or a confident scene review saw the subject sharp. Edge contrast alone never counts. | ### Constants (6) | Export | What it is | | - | - | | `cameraControlDefinitions` | Canonical application vocabulary: ids, labels and search aliases (a vendor's own word is only an alias). | | `DEFAULT_TRANSACTION_POLICY` | The [`TransactionPolicy`](https://darkgrade.com/docs/slate/reference/types-workflow.md#transactionpolicy) a camera uses unless told otherwise: 30 s per phase, up to 6 DeviceBusy retries within 2 s. | | `defaultLoggerConfig` | Inert by default: a logger takes over the console or draws in the terminal only when asked. | | `qualificationSettings` | Portable, deliberately small control contracts. | | `validatedCameraModels` | The single source of truth for which bodies Darkgrade has run on its physical test benches, keyed by the exact DeviceInfo model string. | | `verifiedFeatureModels` | Vendor features physically confirmed on specific bodies; anywhere else they are attempted, unverified. | ### Types (105) | Export | What it is | | - | - | | [`Aperture`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#aperture) | An aperture in Slate's one spelling: `f/` and the f-number without trailing zeros (`f/4`, `f/2.8`). | | [`AspectRatio`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#aspectratio) | The shape of the photo, or a crop of the sensor. | | [`AudioRecording`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#audiorecording) | Movie sound, Canon only for now: `On`, `Off` or `On (manual level)`. | | [`Battery`](https://darkgrade.com/docs/slate/reference/types-results.md#battery) | What the camera reports about its power now. | | [`BenchmarkCheck`](https://darkgrade.com/docs/slate/reference/types-workflow.md#benchmarkcheck) | One check of `runBenchmark` and how it went. | | [`BenchmarkOptions`](https://darkgrade.com/docs/slate/reference/types-workflow.md#benchmarkoptions) | What `runBenchmark` takes. | | [`CameraCapabilities`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracapabilities) | What [`getCapabilities`](https://darkgrade.com/docs/slate/getting_started/camera.md#getcapabilities) resolves to: every setting, the lens, and which operations work now. | | [`CameraControlId`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolid) | A setting id, such as `iso` or `shutterSpeed`. | | [`CameraControlInputs`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolinputs) | What [`setControl`](https://darkgrade.com/docs/slate/getting_started/camera.md#setcontrol) accepts as a value, by setting id: an [`ExposureTimeInput`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretimeinput) for `shutterSpeed`, a number for `colorTemperature` and `audioLevel`, and a string for every other setting. | | [`CameraControlSession`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolsession) | The same control contract on an already-connected native PTP or vendor SDK session, including one typed getter and setter per typed setting ([`getShutterSpeed`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#getshutterspeed), [`setShutterSpeed`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#setshutterspeed), ...). | | [`CameraControlState`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolstate) | One setting as the camera reports it now: its value, the values it offers, and whether it can be written. | | [`CameraEventHandler`](https://darkgrade.com/docs/slate/reference/types-options.md#cameraeventhandler) | A handler for [`on`](https://darkgrade.com/docs/slate/getting_started/camera.md#on): called with no arguments each time the event fires. | | [`CameraEventName`](https://darkgrade.com/docs/slate/reference/types-options.md#cameraeventname) | The events [`on`](https://darkgrade.com/docs/slate/getting_started/camera.md#on) delivers: `settingsChanged` and `mediaAdded`. | | [`CameraIdentification`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameraidentification) | What `identifyCamera` makes of a USB vendor and product ID, without opening the device. | | [`CameraIdentityCandidate`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameraidentitycandidate) | A camera line and model aliases that a cited source associates with one USB vendor/product ID. | | [`CameraInfo`](https://darkgrade.com/docs/slate/reference/types-results.md#camerainfo) | What the body reports about itself. | | [`CameraLens`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameralens) | The attached lens as the camera reports it. | | [`CameraOptions`](https://darkgrade.com/docs/slate/reference/types-options.md#cameraoptions) | What `new Camera()` takes. | | [`CameraPower`](https://darkgrade.com/docs/slate/reference/types-workflow.md#camerapower) | A camera's battery and power reading, as `readCameraPower` returns it. | | [`CameraPowerAssessment`](https://darkgrade.com/docs/slate/reference/types-workflow.md#camerapowerassessment) | What `assessCameraPower` concludes for a planned recording. | | [`CameraRecordingState`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#camerarecordingstate) | What [`getRecordingState`](https://darkgrade.com/docs/slate/getting_started/camera.md#getrecordingstate) resolves to. | | [`CameraRecoveryOptions`](https://darkgrade.com/docs/slate/reference/types-results.md#camerarecoveryoptions) | Limits for [`recover`](https://darkgrade.com/docs/slate/getting_started/camera.md#recover). | | [`CameraRecoveryReport`](https://darkgrade.com/docs/slate/reference/types-results.md#camerarecoveryreport) | What [`recover`](https://darkgrade.com/docs/slate/getting_started/camera.md#recover) did: each software step, whether the camera answered afterwards, and whether only power or hub cycling is left. | | [`CameraRecoveryStep`](https://darkgrade.com/docs/slate/reference/types-results.md#camerarecoverystep) | One step of a recovery and how it went. | | [`CardPhoto`](https://darkgrade.com/docs/slate/reference/types-results.md#cardphoto) | A photo confirmed on the card. | | [`CardStatus`](https://darkgrade.com/docs/slate/reference/types-results.md#cardstatus) | One card slot as the camera reports it now. | | [`Clip`](https://darkgrade.com/docs/slate/reference/types-results.md#clip) | A finished movie file the camera wrote to its card during one recording. | | [`ColorTemperature`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#colortemperature) | A colour temperature in kelvin. | | [`ComputerPhoto`](https://darkgrade.com/docs/slate/reference/types-results.md#computerphoto) | A photo whose bytes reached this computer. | | [`ConnectOptions`](https://darkgrade.com/docs/slate/reference/types-options.md#connectoptions) | How [`Camera.connect`](https://darkgrade.com/docs/slate/getting_started/camera.md#connect) opens the camera. | | [`ContinuousAutofocus`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#continuousautofocus) | Whether the camera keeps focusing before a half-press (Canon Continuous AF): On or Off. | | [`DetectionSubject`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#detectionsubject) | What subject detection looks for: People, Animals, Birds, ... | | [`DeviceDescriptor`](https://darkgrade.com/docs/slate/reference/types-workflow.md#devicedescriptor) | Which device to open: a USB filter, or a host on the network. | | [`DigitalZoom`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#digitalzoom) | How far zoom reaches past the optics: Off is optical only. | | [`DiscoveredCamera`](https://darkgrade.com/docs/slate/reference/types-results.md#discoveredcamera) | One attached camera found by [`Camera.discover()`](https://darkgrade.com/docs/slate/getting_started/camera.md#cameradiscover), without opening a session. | | [`DriveMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#drivemode) | A drive mode in Slate's one spelling (`'Single'`, `'Continuous high'`, `'Self-timer 10 s'`, ...). | | [`EventParams`](https://darkgrade.com/docs/slate/reference/types-workflow.md#eventparams) | The parameters of a raw event, by name. | | [`ExposureCompensation`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposurecompensation) | Exposure compensation in stops with one decimal and a sign: `+0.7`, `-1.0`, `0.0`. | | [`ExposureContext`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposurecontext) | The frame rate that converting between a shutter angle and a duration needs. | | [`ExposureMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuremode) | Who picks the exposure: you (Manual), the camera (Program, Auto), or the two of you (aperture or shutter priority). | | [`ExposureModeAlias`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuremodealias) | The short forms [`setExposureMode`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#setexposuremode) also accepts: the mode-dial letters, and Canon's Av, Tv and Fv. | | [`ExposureTime`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretime) | A shutter speed as a duration in seconds, an angle in degrees, or a named mode (`bulb`, `time`, `flash-sync`, `auto`). | | [`ExposureTimeInput`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretimeinput) | An [`ExposureTime`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretime), or text that `parseExposureTime` reads, such as `1/250`, `0.5"` or `180°`. | | [`EyeSelection`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#eyeselection) | Which eye subject detection focuses on: Auto, Right or Left; Off where a body can turn eye detection off (Canon). | | [`FlashMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#flashmode) | Whether and how the flash fires. | | [`FocusArea`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#focusarea) | Wide, Zone, Spot M, Tracking Spot M, ...; Sony's Flexible Spot is Spot, Lock-on AF is Tracking. | | [`FocusDirection`](https://darkgrade.com/docs/slate/reference/types-options.md#focusdirection) | Which way [`nudgeFocus`](https://darkgrade.com/docs/slate/getting_started/camera.md#nudgefocus) moves focus: `near` towards the camera, `far` away from it. | | [`FocusFrame`](https://darkgrade.com/docs/slate/reference/types-results.md#focusframe) | A frame the camera draws over its picture: its focus area, a detected face or a tracked subject. | | [`FocusMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#focusmode) | AF-S, AF-C or MF, and the other modes a body offers (AF-A, DMF, AF-F, ...). | | [`FocusNudge`](https://darkgrade.com/docs/slate/reference/types-results.md#focusnudge) | What a focus nudge did. | | [`FocusResult`](https://darkgrade.com/docs/slate/reference/types-results.md#focusresult) | Whether [`autofocus`](https://darkgrade.com/docs/slate/getting_started/camera.md#autofocus) confirmed focus: `acquired`, `not-acquired` or `unknown`. | | [`FocusStepSize`](https://darkgrade.com/docs/slate/reference/types-options.md#focusstepsize) | A small, medium or large manual-focus step, like the < << <<< buttons in vendor remote apps. | | [`FrameRate`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#framerate) | A frame rate: `24p`, `23.98p`, `60p`, `50i`. | | [`Iso`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#iso) | An ISO sensitivity: `ISO 800`, `Auto`, and the Sony labels that are distinct settings rather than spellings (an extended sensitivity, the Multi Frame NR sensitivities). | | [`JpegQuality`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#jpegquality) | How much a JPEG is compressed: finer keeps more detail in a bigger file. | | [`LiveViewFrame`](https://darkgrade.com/docs/slate/reference/types-results.md#liveviewframe) | What [`getLiveViewFrame`](https://darkgrade.com/docs/slate/getting_started/camera.md#getliveviewframe) resolves to: one picture and the frames the camera draws over it. | | [`LiveViewFrameOptions`](https://darkgrade.com/docs/slate/reference/types-options.md#liveviewframeoptions) | What [`getLiveViewFrame`](https://darkgrade.com/docs/slate/getting_started/camera.md#getliveviewframe) takes. | | [`LiveViewOverlay`](https://darkgrade.com/docs/slate/reference/types-results.md#liveviewoverlay) | The camera's own on-screen info (menus, dialogs, shooting info), drawn to lay over the picture. | | [`LiveViewQuality`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#liveviewquality) | The live-view picture's quality: High is sharper, Low lighter on the connection. | | [`LoggerConfig`](https://darkgrade.com/docs/slate/reference/types-workflow.md#loggerconfig) | What the `logger` option of `new Camera()` takes. | | [`MediaDownloadOptions`](https://darkgrade.com/docs/slate/reference/types-options.md#mediadownloadoptions) | Progress and cancel for [`downloadMedia`](https://darkgrade.com/docs/slate/getting_started/camera.md#downloadmedia). | | [`MediaItem`](https://darkgrade.com/docs/slate/reference/types-results.md#mediaitem) | One file on the card, as [`listMedia`](https://darkgrade.com/docs/slate/getting_started/camera.md#listmedia) lists it. | | [`MediaPreviewSize`](https://darkgrade.com/docs/slate/reference/types-options.md#mediapreviewsize) | The sizes [`getMediaPreview`](https://darkgrade.com/docs/slate/getting_started/camera.md#getmediapreview) returns: `thumbnail` is the small one, `preview` a larger one. | | [`MeteringMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#meteringmode) | Which part of the frame the camera measures light from. | | [`ObjectInfo`](https://darkgrade.com/docs/slate/reference/types-workflow.md#objectinfo) | A file's PTP [ObjectInfo](https://darkgrade.com/docs/slate/reference/types-workflow.md#objectinfo) dataset, as the camera sent it. | | [`OperationAvailability`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#operationavailability) | One operation's availability now: an unsupported one says why, in words a user can act on. | | [`OperationParams`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationparams) | The parameters of a raw operation, by name, as `protocolSession(camera).send` takes them. | | [`OperationResponse`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationresponse) | What a raw operation resolves to: the response code and parameters, with `data` when the operation returns any. | | [`Photo`](https://darkgrade.com/docs/slate/reference/types-results.md#photo) | What [`takePhoto`](https://darkgrade.com/docs/slate/getting_started/camera.md#takephoto) resolves to: a [`CardPhoto`](https://darkgrade.com/docs/slate/reference/types-results.md#cardphoto) for the destination `card`, a [`ComputerPhoto`](https://darkgrade.com/docs/slate/reference/types-results.md#computerphoto) for `computer` and `computerOnly`. | | [`PhotoDestination`](https://darkgrade.com/docs/slate/reference/types-options.md#photodestination) | Where a photo goes: the camera's card; the card and this computer (its bytes come back); or this computer only, never saved to the card (`computerOnly`). | | [`PhotoFormat`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#photoformat) | A photo format, in each vendor codec's own spelling: `'RAW'`, `'RAW+JPEG'`, `'JPEG'` on current Sony bodies; format and quality together (`'RAW+JPEG Fine'`, `'HEIF Standard'`) on Sony bodies with one combined setting; Canon's format with its size (`'RAW'`, `'cRAW+L'`, `'M'`). | | [`PhotoSize`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#photosize) | A photo size: Sony's codec names (`'Large'`, `'Medium'`, `'Small'`), or the pixel dimensions a standard body lists. | | [`PhotoVideoMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#photovideomode) | Whether the camera is set up to take photos or record video. | | [`PictureProfile`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#pictureprofile) | A Sony Picture Profile (`'Off'`, `'PP1'` to `'PP11'`, `'PP LUT 1'` to `'PP LUT 4'`). | | [`PictureStyle`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#picturestyle) | A look in Slate's one spelling: Canon Picture Style, Nikon Picture Control and Sony Creative Look or Creative Style (`'Standard'`, `'Portrait'`, `'Monochrome'`, ...). | | [`PTPProtocolViolation`](https://darkgrade.com/docs/slate/reference/types-workflow.md#ptpprotocolviolation) | How a reply broke PTP container framing, on [`PTPProtocolError.violation`](https://darkgrade.com/docs/slate/reference/errors.md#ptpprotocolerror). | | [`QualificationCamera`](https://darkgrade.com/docs/slate/reference/types-workflow.md#qualificationcamera) | The camera `qualifyCameraSetting` drives: one read of its controls and one write of a setting. | | [`QualificationSetting`](https://darkgrade.com/docs/slate/reference/types-workflow.md#qualificationsetting) | The settings `qualifyCameraSetting` can exercise. | | [`RawCompression`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#rawcompression) | A NEF compression the body names; a raw number it reports without a name is not a value to write. | | [`RecoveryReport`](https://darkgrade.com/docs/slate/reference/types-results.md#recoveryreport) | What [`Camera.recover()`](https://darkgrade.com/docs/slate/getting_started/camera.md#recover) did: each software step, whether the camera answered GetDeviceInfo afterwards, and whether only power or hub cycling is left. | | [`SettingInput`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#settinginput) | What the typed setter of a setting accepts. | | [`SettingValue`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#settingvalue) | What the typed getter of a setting returns, and its setter resolves to. | | [`ShotAnalysis`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotanalysis) | What `analyseShot` measured in a picture, and how it reads the exposure, focus and colour. | | [`ShotMetrics`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotmetrics) | The numbers `measureShot` takes from the middle of a picture, leaving a 15% border out. | | [`ShotProperty`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotproperty) | A setting as `optimiseShot` reads it: the fields of a [`CameraControlState`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolstate) it needs. | | [`ShotSetupReport`](https://darkgrade.com/docs/slate/reference/types-workflow.md#shotsetupreport) | What `optimiseShot` changed, and whether the result was verified. | | [`ShutterSpeed`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#shutterspeed) | A shutter speed in Slate's one spelling, whatever the vendor calls it: `'1/250'`, `'30"'`, `'0.3"'`, `'180°'`, `'Bulb'`. | | [`SubjectDetection`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#subjectdetection) | Whether the camera looks for faces, eyes and other subjects to focus on. | | [`TakeCamera`](https://darkgrade.com/docs/slate/reference/types-workflow.md#takecamera) | What `VideoTake` needs from each camera: the five steps of a take, which you implement over a [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md). | | [`TakeCameraState`](https://darkgrade.com/docs/slate/reference/types-workflow.md#takecamerastate) | One camera's part in a take: its state, when it started and stopped, and its clips. | | [`TakeMedia`](https://darkgrade.com/docs/slate/reference/types-workflow.md#takemedia) | One clip of a take. | | [`TakePhotoOptions`](https://darkgrade.com/docs/slate/reference/types-options.md#takephotooptions) | What [`takePhoto`](https://darkgrade.com/docs/slate/getting_started/camera.md#takephoto) takes. | | [`TransactionPolicy`](https://darkgrade.com/docs/slate/reference/types-workflow.md#transactionpolicy) | How long and how often Slate waits for a camera before giving up on a transaction. | | [`TransportInterface`](https://darkgrade.com/docs/slate/reference/types-workflow.md#transportinterface) | What a transport implements to carry PTP for a [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md). | | [`TypedSettingId`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#typedsettingid) | The settings with a typed getter and setter. | | [`TypedSettingMethods`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#typedsettingmethods) | One getter and one setter per typed setting, declared once over [`setControl`](https://darkgrade.com/docs/slate/getting_started/camera.md#setcontrol): [`setShutterSpeed`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#setshutterspeed) is `setControl('shutterSpeed', …)` and resolves to the value the camera read back; the getter reads the current value. | | [`UnrecognizedValues`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#unrecognizedvalues) | Raw values the camera reported that Slate has no name for. | | [`VerifiedFeature`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#verifiedfeature) | A vendor feature confirmed on specific bodies on Darkgrade's benches, for `isVerifiedFeature`. | | [`VideoFormat`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#videoformat) | A video format: Sony's codec names (`XAVC S 4K`), Nikon's file type (`H.265 10-bit (MOV)`) or Canon's complete movie record. | | [`VideoQuality`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#videoquality) | A video quality (bit rate, sampling and depth), as the vendor codecs name it: `150M 4:2:0 10-bit`. | | [`VideoTakeState`](https://darkgrade.com/docs/slate/reference/types-workflow.md#videotakestate) | A take on several cameras as `VideoTake` publishes it: its stage and each camera's state. | | [`WhiteBalance`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#whitebalance) | A white balance in Slate's one spelling, whatever the vendor calls it: Nikon's "Sunny" is `'Daylight'`, Canon's kebab-case codes are `'Auto'`, `'Shade'`, `'Color Temperature'` and so on. | | [`ZoomDirection`](https://darkgrade.com/docs/slate/reference/types-options.md#zoomdirection) | Which way [`startZoom`](https://darkgrade.com/docs/slate/getting_started/camera.md#startzoom) zooms: `in` towards the long end of the lens, `out` towards the wide end. | | [`ZoomOptions`](https://darkgrade.com/docs/slate/reference/types-options.md#zoomoptions) | What [`startZoom`](https://darkgrade.com/docs/slate/getting_started/camera.md#startzoom) takes. | | [`ZoomSpeed`](https://darkgrade.com/docs/slate/reference/types-options.md#zoomspeed) | How fast [`startZoom`](https://darkgrade.com/docs/slate/getting_started/camera.md#startzoom) moves the lens. | ## @darkgrade/slate/cli packages/slate/src/cli/index.ts The `darkgrade` command as a function, for an executable that embeds it. ```typescript import { runDarkgradeCli } from '@darkgrade/slate/cli' const exitCode = await runDarkgradeCli(process.argv.slice(2)) ``` Guide: [CLI](https://darkgrade.com/docs/cli.md) **Functions** | Export | What it is | | - | - | | `runDarkgradeCli()` | Terminal command behavior shared by the thin darkgrade executable and other Node hosts. | **Types** | Export | What it is | | - | - | | `DarkgradeCliHost` | What the embedding executable knows and Slate does not. | ## @darkgrade/slate/controls packages/slate/src/controls.ts The setting vocabulary and value conversions without any driver or USB code, for a browser page that draws controls. ```typescript import { parseExposureTime } from '@darkgrade/slate/controls' ``` Guide: [Settings and values](https://darkgrade.com/docs/slate/getting_started/controls.md) ### Classes (5) | Export | What it is | | - | - | | [`CameraClipNotFoundError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraclipnotfounderror) | The camera confirmed it stopped recording, but no new finished clip appeared on the card in time. | | [`CameraConfirmationError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraconfirmationerror) | An acknowledged request whose fresh camera observation did not confirm the requested state. | | [`CameraOutcomeUnknownError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraoutcomeunknownerror) | The command was sent but its result could not be confirmed. | | [`CameraRefusedError`](https://darkgrade.com/docs/slate/reference/errors.md#camerarefusederror) | The camera said no, or the value is not one it offers now. | | [`CameraUnsupportedError`](https://darkgrade.com/docs/slate/reference/errors.md#cameraunsupportederror) | This camera cannot do it right now; [`getCapabilities()`](https://darkgrade.com/docs/slate/getting_started/camera.md#getcapabilities) says why. | ### Functions (6) | Export | What it is | | - | - | | `exposureSeconds()` | An exposure time in seconds. An angle needs `context.framesPerSecond`; a named value such as Bulb gives `undefined`. | | `formatShutterSpeed()` | The canonical spelling of an observed exposure; the camera's label is used only to keep a ratio. | | `matchExposureTime()` | Match an actual advertised value; do not round to a nearby camera setting. | | `parseExposureTime()` | Reads text such as `1/250`, `0.5"`, `180°` or `bulb`, or an [`ExposureTime`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretime) object, into an `ExposureTime`. Throws on input it cannot read. | | `resolveCameraControl()` | The setting id for a name or alias, ignoring case, spaces, hyphens and underscores; `undefined` when none matches. | | `unrecognizedValueLabel()` | Hexadecimal for integers (`0x1234`), verbatim for text. | ### Constants (3) | Export | What it is | | - | - | | `cameraControlDefinitions` | Canonical application vocabulary: ids, labels and search aliases (a vendor's own word is only an alias). | | `exposureModes` | The exposure modes, as words. | | `meteringModes` | The metering modes, as words. | ### Types (37) | Export | What it is | | - | - | | [`Aperture`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#aperture) | An aperture in Slate's one spelling: `f/` and the f-number without trailing zeros (`f/4`, `f/2.8`). | | [`CameraCapabilities`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracapabilities) | What [`getCapabilities`](https://darkgrade.com/docs/slate/getting_started/camera.md#getcapabilities) resolves to: every setting, the lens, and which operations work now. | | [`CameraControlId`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolid) | A setting id, such as `iso` or `shutterSpeed`. | | [`CameraControlInputs`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolinputs) | What [`setControl`](https://darkgrade.com/docs/slate/getting_started/camera.md#setcontrol) accepts as a value, by setting id: an [`ExposureTimeInput`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretimeinput) for `shutterSpeed`, a number for `colorTemperature` and `audioLevel`, and a string for every other setting. | | [`CameraControlSession`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolsession) | The same control contract on an already-connected native PTP or vendor SDK session, including one typed getter and setter per typed setting ([`getShutterSpeed`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#getshutterspeed), [`setShutterSpeed`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#setshutterspeed), ...). | | [`CameraControlState`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameracontrolstate) | One setting as the camera reports it now: its value, the values it offers, and whether it can be written. | | [`CameraLens`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#cameralens) | The attached lens as the camera reports it. | | [`CameraRecordingState`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#camerarecordingstate) | What [`getRecordingState`](https://darkgrade.com/docs/slate/getting_started/camera.md#getrecordingstate) resolves to. | | [`ColorTemperature`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#colortemperature) | A colour temperature in kelvin. | | [`ContinuousAutofocus`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#continuousautofocus) | Whether the camera keeps focusing before a half-press (Canon Continuous AF): On or Off. | | [`DetectionSubject`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#detectionsubject) | What subject detection looks for: People, Animals, Birds, ... | | [`DigitalZoom`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#digitalzoom) | How far zoom reaches past the optics: Off is optical only. | | [`DriveMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#drivemode) | A drive mode in Slate's one spelling (`'Single'`, `'Continuous high'`, `'Self-timer 10 s'`, ...). | | [`ExposureCompensation`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposurecompensation) | Exposure compensation in stops with one decimal and a sign: `+0.7`, `-1.0`, `0.0`. | | [`ExposureContext`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposurecontext) | The frame rate that converting between a shutter angle and a duration needs. | | [`ExposureMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuremode) | Who picks the exposure: you (Manual), the camera (Program, Auto), or the two of you (aperture or shutter priority). | | [`ExposureModeAlias`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuremodealias) | The short forms [`setExposureMode`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#setexposuremode) also accepts: the mode-dial letters, and Canon's Av, Tv and Fv. | | [`ExposureTime`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretime) | A shutter speed as a duration in seconds, an angle in degrees, or a named mode (`bulb`, `time`, `flash-sync`, `auto`). | | [`ExposureTimeInput`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretimeinput) | An [`ExposureTime`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#exposuretime), or text that `parseExposureTime` reads, such as `1/250`, `0.5"` or `180°`. | | [`EyeSelection`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#eyeselection) | Which eye subject detection focuses on: Auto, Right or Left; Off where a body can turn eye detection off (Canon). | | [`FocusArea`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#focusarea) | Wide, Zone, Spot M, Tracking Spot M, ...; Sony's Flexible Spot is Spot, Lock-on AF is Tracking. | | [`FocusMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#focusmode) | AF-S, AF-C or MF, and the other modes a body offers (AF-A, DMF, AF-F, ...). | | [`Iso`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#iso) | An ISO sensitivity: `ISO 800`, `Auto`, and the Sony labels that are distinct settings rather than spellings (an extended sensitivity, the Multi Frame NR sensitivities). | | [`LiveViewQuality`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#liveviewquality) | The live-view picture's quality: High is sharper, Low lighter on the connection. | | [`MeteringMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#meteringmode) | Which part of the frame the camera measures light from. | | [`OperationAvailability`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#operationavailability) | One operation's availability now: an unsupported one says why, in words a user can act on. | | [`PhotoVideoMode`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#photovideomode) | Whether the camera is set up to take photos or record video. | | [`PictureProfile`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#pictureprofile) | A Sony Picture Profile (`'Off'`, `'PP1'` to `'PP11'`, `'PP LUT 1'` to `'PP LUT 4'`). | | [`PictureStyle`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#picturestyle) | A look in Slate's one spelling: Canon Picture Style, Nikon Picture Control and Sony Creative Look or Creative Style (`'Standard'`, `'Portrait'`, `'Monochrome'`, ...). | | [`SettingInput`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#settinginput) | What the typed setter of a setting accepts. | | [`SettingValue`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#settingvalue) | What the typed getter of a setting returns, and its setter resolves to. | | [`ShutterSpeed`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#shutterspeed) | A shutter speed in Slate's one spelling, whatever the vendor calls it: `'1/250'`, `'30"'`, `'0.3"'`, `'180°'`, `'Bulb'`. | | [`SubjectDetection`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#subjectdetection) | Whether the camera looks for faces, eyes and other subjects to focus on. | | [`TypedSettingId`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#typedsettingid) | The settings with a typed getter and setter. | | [`TypedSettingMethods`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#typedsettingmethods) | One getter and one setter per typed setting, declared once over [`setControl`](https://darkgrade.com/docs/slate/getting_started/camera.md#setcontrol): [`setShutterSpeed`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#setshutterspeed) is `setControl('shutterSpeed', …)` and resolves to the value the camera read back; the getter reads the current value. | | [`UnrecognizedValues`](https://darkgrade.com/docs/slate/reference/types-capabilities.md#unrecognizedvalues) | Raw values the camera reported that Slate has no name for. | | [`WhiteBalance`](https://darkgrade.com/docs/slate/reference/types-setting-values.md#whitebalance) | A white balance in Slate's one spelling, whatever the vendor calls it: Nikon's "Sunny" is `'Daylight'`, Canon's kebab-case codes are `'Auto'`, `'Shade'`, `'Color Temperature'` and so on. | ## @darkgrade/slate/protocol packages/slate/src/protocol.ts Raw PTP access, the vendor drivers, the registries of operations, properties and events, PTP/IP and wireless pairing. Unsupported: names follow each vendor's own protocol, and nothing here is confirmed the way [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md) operations are. ```typescript import { protocolSession } from '@darkgrade/slate/protocol' ``` Guides: [Raw protocol access](https://darkgrade.com/docs/slate/guides/protocol.md) · [Wi-Fi with PTP/IP](https://darkgrade.com/docs/slate/getting_started/ptp-ip.md) ### Classes (14) | Export | What it is | | - | - | | `CanonCamera` | Canon publishes its PTP implementation only under NDA. | | `NikonAccessoryController` | One persistent Nikon PTP session. | | `NikonEventDataCodec` | Z6III SDK command reference rev 2, section 6.2.2.13: UINT32 record count, then UINT16 event code, UINT16 parameter count and UINT32 parameters per record. | | `NikonMenuController` | Navigation on the physically validated Z6III firmware only. | | `NikonShotControls` | Movie controls on one caller-owned persistent session. | | `OpenEnumCodec` | An enumeration whose wire values differ between bodies (a property one specification names and another body uses differently): a value with no name decodes as that raw value instead of failing, so a read keeps what the camera said. | | `PTPIPTransactionCancelledError` | A wire Cancel is a cancelled transaction, never an invented PTP response code. | | `SonyBluetoothRemote` | A bonded Bluetooth remote. | | `SonyPtpVideoRecording` | Native Sony PTP only: observed movie state, card identity and bounded-memory transfer. | | `SonyRemoteSdkTransport` | Transport adapter for an authenticated Sony Camera Remote SDK session. | | `SonyVideoRecording` | Camera-card take over the same official Sony SDK connection on USB or Wi-Fi. | | `SonyWifiCamera` | A camera session over Sony's Camera Remote SDK, authenticated over Wi-Fi only (never USB): the CameraSession operations it can serve, under the same names and results as the native driver. | | `UsbVideoRecording` | Persistent PTP movie recording, final-file discovery and bounded-memory transfer. | | `VendorExtensionCamera` | A camera from a vendor whose darkgrade support is limited to cited vendor operation definitions (Fujifilm, Panasonic, OM System/Olympus, Leica, Sigma). | ### Functions (21) | Export | What it is | | - | - | | `compareSonyModels()` | SDK feature contracts are comparison evidence, never a replacement for runtime advertisement. | | `connectNikonWifiCamera()` | Connect an already paired, active Nikon Camera Control profile. | | `createEnumCodec()` | An EnumCodec whose names are inferred from its values. | | `createOpenEnumCodec()` | An OpenEnumCodec whose names are inferred from its values. | | `createSonySdkBridge()` | Spawn an operator-installed official-SDK bridge; no SDK binaries are bundled. | | `decodeNikonPairingCode()` | Decode the Nikon 952B digit dataset; digits are numeric bytes, not ASCII. | | `decodeSonyMonitoringFormat()` | Decode the public SDK's packed CrMonitoringFormat without losing uint64 bits. | | `discoverNikonWifiCameras()` | One bounded, read-only mDNS browse on the chosen IPv4 network interface. | | `encodeNikonAccessoryInfo()` | Optional accessory metadata. | | `encodeNikonAccessoryKey()` | Five-byte accessory button state; the last two dial bytes remain neutral. | | `isMovableFocusArea()` | A focus area whose position can be moved: any spot, in Sony's words (Flexible Spot) or Slate's (Spot). | | `pairNikonWifiProfile()` | Pair an already selected Nikon Camera Control network profile over PTP/IP. | | `prepareNikonManualExposure()` | Enable remote Manual exposure on an owned idle Nikon session. | | `protocolSession()` | The protocol session of a Camera, the same object on every call. | | `readNikonRecordingStatus()` | Fresh read on an owned Nikon session, including bodies omitting this descriptor from DeviceInfo. | | `readNikonWirelessStatus()` | Read-only Nikon WTU capabilities; a USB profile bank is not proof of an active Wi-Fi connection. | | `recordFullTransport()` | Wrap before constructing the camera. | | `requestNikonWifi()` | Authenticate an existing smart-device registration and request its private WPA network. | | `sonyMovieSlots()` | Read the movie destination without changing the camera's recording-media selection. | | `sonyWifiKeyboardCharacter()` | Plan printable ASCII input without including input values in error messages. | | `typeSonyWifiKeyboard()` | Enter text in an empty Sony Wi-Fi SSID/password keyboard, then select OK. | ### Constants (6) | Export | What it is | | - | - | | `ExternalDCIn` | Z6 III command specification 2.00, section 6.5.14.1. | | `MovieShutterMode` | Z6 III command specification 2.00, sections 6.5.4.51 and 6.5.12.3. | | `nikonOperationRegistry` | 0x90ef DeleteWirelessProfile was observed, but its request layout was not captured. | | `OBJECT_SIZE_UNREPORTED` | ObjectCompressedSize when the object is 4 GiB or larger: its real size needs a 64-bit query. | | `SONY_BLUETOOTH_REMOTE_SERVICE` | Published RMT-P1BT protocol. | | `SONY_CAMERA_BUTTONS` | Upper 16 bits of the CameraButtonFunction payload (Camera Remote SDK CrCameraButtonFunction). | ### Types (12) | Export | What it is | | - | - | | `EventData` | An event emitter for Node.js and browsers. | | `NikonQueuedEvent` | Nikon GetEventEx records carry a count for each event's UINT32 parameter words. | | `NikonWifiAdvertisement` | Nikon Royalmile advertises PTP endpoints through Bonjour. | | [`ObjectInfo`](https://darkgrade.com/docs/slate/reference/types-workflow.md#objectinfo) | A file's PTP [ObjectInfo](https://darkgrade.com/docs/slate/reference/types-workflow.md#objectinfo) dataset, as the camera sent it. | | `ProtocolSession` | Raw protocol access to one Camera, for bench diagnostics. | | `SonyContentFile` | Sony's ContentInfoList (Camera Control PTP 3 reference, "ContentInfoList"): the card's contents as the camera indexes them in Remote Control with Transfer Mode. | | `SonyFrameKind` | Sony's FocalFrameInfo (Camera Control PTP 3 reference, "FocalFrameInfo"): the frames the camera draws over live view (its focus area, detected faces and tracked subjects), carried in every live-view dataset. | | `SonyKeyboardControls` | Each button press must finish by refreshing image(). | | `SonyKeyboardImage` | Decoded 640 × 480 Sony OSD frame; the caller supplies PNG decoding. | | `SonyRemoteSdkChannel` | The wire channel opened by Sony Camera Remote SDK after SSH authentication. | | `SonyWifiCameraModel` | Any Sony body name is attempted; the bench-verified bodies stay named for completion. | | `SonyWirelessConnection` | `verified` is false when the named body (or an unnamed one) has not been confirmed on a bench. | ### Also exported (124) [`ArrayCodec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#arraycodec) [`BaseCodecRegistry`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#basecodecregistry) `baseCodecs` [`BaseCodecType`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#basecodectype) [`BitfieldCodec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#bitfieldcodec) [`BitfieldFlag`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#bitfieldflag) `CameraDriverInstance` `CanonExtendedDeviceInfo` `CanonLiveViewFrame` `CanonLiveViewMagnification` `CanonNetworkState` `CanonPropertyState` `CanonRawEvent` `CanonUnknownPropertyState` [`CodecBuilder`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#codecbuilder) [`CodecDefinition`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#codecdefinition) [`CodecInstance`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#codecinstance) [`CodecType`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#codectype) [`createBaseCodecs()`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#createbasecodecs) [`CustomCodec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#customcodec) [`CustomCodecType`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#customcodectype) [`DataDirection`](https://darkgrade.com/docs/slate/ptp-reference/types/operation.md#datadirection) [`DatatypeCode`](https://darkgrade.com/docs/slate/ptp-reference/types/datatype.md#datatypecode) [`DatatypeDefinition`](https://darkgrade.com/docs/slate/ptp-reference/types/datatype.md#datatypedefinition) `DeviceInfo` `DeviceInfoCodec` [`DevicePropCode`](https://darkgrade.com/docs/slate/ptp-reference/types/property.md#devicepropcode) [`EnumCodec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#enumcodec) [`EnumValue`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#enumvalue) [`EventCode`](https://darkgrade.com/docs/slate/ptp-reference/types/event.md#eventcode) [`EventDefinition`](https://darkgrade.com/docs/slate/ptp-reference/types/event.md#eventdefinition) [`EventEmitter`](https://darkgrade.com/docs/slate/ptp-reference/types/event.md#eventemitter) [`EventParameter`](https://darkgrade.com/docs/slate/ptp-reference/types/event.md#eventparameter) `formatRegistry` `GenericCamera` `genericEventRegistry` `genericOperationRegistry` `genericPropertyRegistry` `getDatatypeByCode()` [`Int16Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#int16codec) [`Int32Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#int32codec) [`Int64Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#int64codec) [`Int8Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#int8codec) `IPTransport` `IPTransportOptions` `LiveViewPanDirection` `MovieShutterAngle` `NIKON_BLUETOOTH_REMOTE_COMMAND` `NIKON_BLUETOOTH_REMOTE_SERVICE` `NikonAccessoryInfo` `NikonAccessoryKey` `NikonAccessorySoftwareConfirmationOptions` `NikonAccessoryState` `NikonBluetoothChannel` `NikonBluetoothKey` `NikonBluetoothRemote` `NikonCamera` `NikonFocusPointResult` `NikonFocusResult` `NikonLiveViewMetadata` `NikonMenuKey` `NikonMenuRunOptions` `NikonSmartDeviceChannel` `NikonWifiConnectionOptions` `NikonWifiPairingOptions` `ObjectInfoCodec` [`OperationCode`](https://darkgrade.com/docs/slate/ptp-reference/types/operation.md#operationcode) [`OperationDefinition`](https://darkgrade.com/docs/slate/ptp-reference/types/operation.md#operationdefinition) [`ParameterDefinition`](https://darkgrade.com/docs/slate/ptp-reference/types/parameter.md#parameterdefinition) `parseSonyContentInfoList()` `parseSonyFocalFrameInfo()` [`PropertyAccess`](https://darkgrade.com/docs/slate/ptp-reference/types/property.md#propertyaccess) [`PropertyDefinition`](https://darkgrade.com/docs/slate/ptp-reference/types/property.md#propertydefinition) [`PTPRegistry`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#ptpregistry) [`RangeCodec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#rangecodec) [`RangeSpec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#rangespec) [`ResponseCode`](https://darkgrade.com/docs/slate/ptp-reference/types/response.md#responsecode) [`ResponseDefinition`](https://darkgrade.com/docs/slate/ptp-reference/types/response.md#responsedefinition) `responseRegistry` `SONY_BLUETOOTH_REMOTE_COMMAND` `SONY_BLUETOOTH_REMOTE_NOTIFICATION` `SONY_SDK_PROPERTY_CODES` `SonyBluetoothChannel` `SonyBluetoothDirectAuthentication` `SonyBluetoothDirection` `SonyCamera` `SonyCameraButton` `SonyContent` `SonyContentInfoList` `sonyEventRegistry` `SonyFocalFrame` `SonyFocalFrameInfo` `sonyFormatRegistry` `sonyModelContracts` `SonyMonitoringFormat` `sonyMovieCard()` `sonyOperationRegistry` `SonyOsdImage` `sonyPreviewCapabilities()` `sonyPropertyRegistry` `SonyPropertyState` `sonyPtpMovieCard()` `SonyRemoteSdkChannelFactory` `SonyRemoteSdkConnectionOptions` `sonyResponseRegistry` `SonySdkBridge` `SonySdkBridgeOptions` `SonySdkProperty` `SonyWifiAuthentication` `StandardPropertyState` `StorageInfo` `StorageInfoCodec` [`StringCodec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#stringcodec) `TransportFactory` `TransportRecordingEntry` `TransportRecordingOptions` `TransportType` [`Uint16Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#uint16codec) [`Uint32Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#uint32codec) [`Uint64Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#uint64codec) [`Uint8Codec`](https://darkgrade.com/docs/slate/ptp-reference/types/codec.md#uint8codec) `USBTransport` `validateSonyWifiAuthentication()` `VendorIDs` ## @darkgrade/slate/runtime packages/slate/src/runtime/index.ts What a host embeds to share one camera between several callers: `CameraRuntime` with its per-camera queue, the operation list the MCP tools and the CLI are generated from, and cross-process ownership (`HardwareCoordinator`). In a browser bundle this path resolves to the browser entry. A bundler that honours the `browser` condition gets `runtime/browser` instead, the same as `@darkgrade/slate/runtime/browser`. ```typescript import { CameraRuntime } from '@darkgrade/slate/runtime' ``` Guide: [Host cameras for other processes](https://darkgrade.com/docs/slate/guides/runtime.md) **Classes** | Export | What it is | | - | - | | `CameraRuntime` | One runtime per session-owning host. | | `HardwareBusyError` | Another operation or process holds the camera. Carries `status` (409), `code` (`HARDWARE_BUSY`) and `retryAfterMilliseconds`. | | `HardwareCoordinator` | Cross-process camera ownership, with reentrant nested calls on the same operation. | | `HttpCameraClient` | Connect to the existing owning host. | | `OperationInputError` | A call's inputs do not match the operation's parameters; nothing was sent to a camera. | **Functions** | Export | What it is | | - | - | | `killMacCameraDaemons()` | Stops the macOS camera daemons that are running and returns the ones it stopped. | | `readOperationInput()` | Checks one call's inputs against the operation's parameters and converts them: numbers from numeric text, `time` to a Date. | | `runOperation()` | Runs one public operation on a Camera with inputs already read by `readOperationInput`. | | `surfaceOperations()` | Every public operation with its MCP and CLI names, in Camera's declaration order. | **Types** | Export | What it is | | - | - | | [`CameraClient`](https://darkgrade.com/docs/slate/reference/types-workflow.md#cameraclient) | What MCP and other remote frontends call: the public operations, by their library name. | | `CameraOperationDescription` | One public Camera method as the generator read it. | | [`CameraProvider`](https://darkgrade.com/docs/slate/reference/types-workflow.md#cameraprovider) | Platform hosts supply the connected Camera and physical services, never a second MCP-owned session. | | [`OperationFile`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationfile) | A file an operation returned: a live-view frame, a preview, a photo's or a download's bytes. | | [`OperationInput`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationinput) | One call's inputs by parameter name, as an MCP client or the command line gave them. | | `OperationOutcome` | An operation's result, as Slate returned it, with its bytes moved out into files. | | `OperationParameter` | One input of an operation, the same on every surface: a named MCP argument, and on the CLI a positional argument when required, otherwise a flag. | | [`OperationReply`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationreply) | An operation's result as it crosses a process: JSON, with any bytes the host saved by path. | | [`OwnershipStore`](https://darkgrade.com/docs/slate/reference/types-workflow.md#ownershipstore) | The store a `HardwareCoordinator` keeps its leases in, shared by every process that might open the same camera. | | [`SurfaceOperation`](https://darkgrade.com/docs/slate/reference/types-workflow.md#surfaceoperation) | One public [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md) operation with its MCP tool and CLI command names, as `surfaceOperations()` lists it. | Also exported: `surfaceOperation()` ## @darkgrade/slate/runtime/browser packages/slate/src/runtime/browser.ts The runtime without any Node import: everything in `./runtime` except cross-process ownership. ```typescript import { HttpCameraClient } from '@darkgrade/slate/runtime/browser' ``` **Classes** | Export | What it is | | - | - | | `CameraRuntime` | One runtime per session-owning host. | | `HardwareBusyError` | Another operation or process holds the camera. Carries `status` (409), `code` (`HARDWARE_BUSY`) and `retryAfterMilliseconds`. | | `HttpCameraClient` | Connect to the existing owning host. | | `OperationInputError` | A call's inputs do not match the operation's parameters; nothing was sent to a camera. | **Functions** | Export | What it is | | - | - | | `readOperationInput()` | Checks one call's inputs against the operation's parameters and converts them: numbers from numeric text, `time` to a Date. | | `runOperation()` | Runs one public operation on a Camera with inputs already read by `readOperationInput`. | | `surfaceOperations()` | Every public operation with its MCP and CLI names, in Camera's declaration order. | **Types** | Export | What it is | | - | - | | [`CameraClient`](https://darkgrade.com/docs/slate/reference/types-workflow.md#cameraclient) | What MCP and other remote frontends call: the public operations, by their library name. | | `CameraOperationDescription` | One public Camera method as the generator read it. | | [`CameraProvider`](https://darkgrade.com/docs/slate/reference/types-workflow.md#cameraprovider) | Platform hosts supply the connected Camera and physical services, never a second MCP-owned session. | | [`OperationFile`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationfile) | A file an operation returned: a live-view frame, a preview, a photo's or a download's bytes. | | [`OperationInput`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationinput) | One call's inputs by parameter name, as an MCP client or the command line gave them. | | `OperationOutcome` | An operation's result, as Slate returned it, with its bytes moved out into files. | | `OperationParameter` | One input of an operation, the same on every surface: a named MCP argument, and on the CLI a positional argument when required, otherwise a flag. | | [`OperationReply`](https://darkgrade.com/docs/slate/reference/types-workflow.md#operationreply) | An operation's result as it crosses a process: JSON, with any bytes the host saved by path. | | [`SurfaceOperation`](https://darkgrade.com/docs/slate/reference/types-workflow.md#surfaceoperation) | One public [`Camera`](https://darkgrade.com/docs/slate/getting_started/camera.md) operation with its MCP tool and CLI command names, as `surfaceOperations()` lists it. | Also exported: `surfaceOperation()` ## @darkgrade/slate/runtime/mcp packages/slate/src/runtime/mcp.ts The MCP server: one `camera_` tool per public Camera operation, generated from the same list. Needs the optional peer dependencies `@modelcontextprotocol/server` and `zod`. ```typescript import { serveStdio } from '@modelcontextprotocol/server/stdio' import { HttpCameraClient } from '@darkgrade/slate/runtime' import { createCameraMcpServer } from '@darkgrade/slate/runtime/mcp' // Tools run on the cameras a host already holds. const client = new HttpCameraClient(hostUrl) await serveStdio(() => createCameraMcpServer(client)) ``` Guide: [MCP](https://darkgrade.com/docs/ai.md) **Functions** | Export | What it is | | - | - | | `cameraToolDefinitions()` | One tool per public Camera operation, named and described from Camera itself: `camera_` + the method in snake_case, with the method's inputs. | | `registerCameraTools()` | Registers the generated camera tools, plus `camera_run_benchmark` where the host offers it. | | `toolError()` | An MCP tool's error result; a busy camera keeps its code and retry hint for the client. | **Constants** | Export | What it is | | - | - | | `slateToolMeta` | The `_meta` key on every tool Slate generates, with the Camera operation it runs. | **Types** | Export | What it is | | - | - | | `CameraToolDefinition` | One generated camera tool: its MCP name, schema and annotations, and the operation it runs. | | `CameraToolOptions` | How a host that holds one camera serves the tools. | Also exported: `createCameraMcpServer()` ## @darkgrade/slate/runtime/ownership packages/slate/src/runtime/ownership.ts Cross-process camera ownership with leases and heartbeats, for a host with more than one process. ```typescript import { HardwareCoordinator } from '@darkgrade/slate/runtime/ownership' ``` **Classes** | Export | What it is | | - | - | | `HardwareCoordinator` | Cross-process camera ownership, with reentrant nested calls on the same operation. | **Constants** | Export | What it is | | - | - | | `OWNERSHIP_LEASE_MILLISECONDS` | How long a claim lasts without a heartbeat, how often a held claim is renewed, and how often a waiting call retries. | **Types** | Export | What it is | | - | - | | [`OwnershipStore`](https://darkgrade.com/docs/slate/reference/types-workflow.md#ownershipstore) | The store a `HardwareCoordinator` keeps its leases in, shared by every process that might open the same camera. | Also exported: `OWNERSHIP_HEARTBEAT_MILLISECONDS` ## @darkgrade/slate/telemetry packages/slate/src/contribute/application.ts Diagnostics sharing for an application that embeds Slate: one shared queue per process. Also importable as `@darkgrade/slate/telemetry/application`. ```typescript import { createApplicationDiagnostics } from '@darkgrade/slate/telemetry' ``` Guide: [Telemetry](https://darkgrade.com/docs/slate/guides/telemetry.md) **Functions** | Export | What it is | | - | - | | `createApplicationDiagnostics()` | Create once per application process and observe every camera through this shared queue. | Also exported: `ApplicationDiagnosticsOptions` `InstallationState` `InstallationStore` `validateInstallationState()` ## @darkgrade/slate/telemetry/batch packages/slate/src/contribute/batch.ts The batch a client uploads, and its validation. ```typescript import { validateBatch } from '@darkgrade/slate/telemetry/batch' ``` Also exported: `BATCH_SCHEMA` `DiagnosticBatch` `DIAGNOSTICS_NOTICE` `MAXIMUM_BATCH_CAMERAS` `NOTICE_VERSION` `validateBatch()` ## @darkgrade/slate/telemetry/installation-store packages/slate/src/contribute/installation-store.ts A file store for the installation state. The application supplies how it is protected. ```typescript import { installationFileStore, } from '@darkgrade/slate/telemetry/installation-store' ``` **Functions** | Export | What it is | | - | - | | `installationFileStore()` | One owner per application. | Also exported: `CredentialProtection` ## @darkgrade/slate/telemetry/protocol packages/slate/src/contribute/protocol.ts The protocol evidence a diagnostic entry can carry, and its validation. ```typescript import { isSafeProtocolProperty } from '@darkgrade/slate/telemetry/protocol' ``` **Functions** | Export | What it is | | - | - | | `validateProtocol()` | Explicit numeric fields only. | Also exported: `isSafeProtocolProperty()` `ObservedSetting` `ProtocolCategory` `ProtocolEvidence` `ProtocolNumber` `StatePhase` ## @darkgrade/slate/telemetry/schema packages/slate/src/contribute/schema.ts The diagnostic entry schema, its limits and its validation. ```typescript import { cameraHardwareFingerprint, } from '@darkgrade/slate/telemetry/schema' ``` **Functions** | Export | What it is | | - | - | | `cameraHardwareFingerprint()` | Stable across reconnects, firmware updates and installations; absent when no reliable body serial exists. | | `redactMessage()` | Removes paths, addresses and long identifiers (serials, object ids) from an error message. | | `validateContribution()` | Reject extra fields instead of silently accepting images, serials, paths or free-form logs. | **Constants** | Export | What it is | | - | - | | `CONTACT_CONFIRMATION_HOURS` | The same, in hours, for help and messages. | | `CONTACT_CONFIRMATION_MILLISECONDS` | How long an emailed confirmation link works. | | `isLegacyArgumentText()` | Argument text as a collector from before 2026-12-02 accepts it. | | `isSafeArgumentText()` | A setting value as Slate spells it (`1/250`, `F2.8`, `IPB (Standard)`, Nikon's `Fine★`, a Canon movie record's label), never a path. | **Types** | Export | What it is | | - | - | | `ApiCall` | A public Camera operation as the caller asked for it: the operation table's name ([`setShutterSpeed`](https://darkgrade.com/docs/slate/reference/settings-exposure.md#setshutterspeed)) with its MCP tool and CLI command, where it came from, and how it ended. | | `ApiCallArgument` | One input of a public call. | | `ApiCallError` | A failed call's typed error. | ### Also exported (14) `API_CALL_OUTCOMES` `API_CALL_SURFACES` `CameraContext` `Contribution` `DiagnosticEntry` `DISCLOSURE` `INSTALLATION_KEY` `installationIdOf()` `installationKey()` `isContributionId()` `MAXIMUM_BODY_BYTES` `MAXIMUM_ENTRIES` `Repeated` `SCHEMA` ## @darkgrade/slate/telemetry/settings packages/slate/src/contribute/settings.ts Where Node keeps the sharing preference and saved diagnostics, and the shared Node queue. ```typescript import { closeNodeDiagnostics } from '@darkgrade/slate/telemetry/settings' ``` **Functions** | Export | What it is | | - | - | | `flushNodeDiagnostics()` | Bounded final delivery for process owners; never used on the camera-operation path. | | `knownCameras()` | Remembers, per USB identity a host asked for, the manufacturer and model the camera reported when it last answered there. | | `localDiagnostics()` | Per-process rotation avoids cross-process append/rotation races. | | `nodeDiagnostics()` | One queue and identity shared by all Slate cameras in this process; Studio and the CLI use the same file. | | `reportedFacts()` | Remembers, across processes, which unchanging protocol facts this installation already shared, so each camera connection does not upload the same inventory again. | **Constants** | Export | What it is | | - | - | | `sharedKnownCameras()` | The installation's single record of which camera each USB identity last reported itself as. | | `sharedReportedFacts()` | The installation's single memory of protocol facts it has already shared. | | `telemetryEndpoint()` | An override changes the destination; opting out uses the saved preference or opt-out environment flags. | Also exported: `closeNodeDiagnostics()` `DEFAULT_TELEMETRY_URL` `saveDiagnosticProfile()` `settingsDirectory()` `sharedSettings()` ## @darkgrade/slate/telemetry/server packages/slate/src/telemetry/server/index.ts The collector. Importing it connects no database and starts no service. ```typescript import { createTelemetry } from '@darkgrade/slate/telemetry/server' ``` **Classes** | Export | What it is | | - | - | | `InvalidMatrixCursor` | A page of the Matrix export was asked for with a cursor the collector cannot read. | | `MatrixExportChanged` | The Matrix export changed or expired between pages: restart the synchronisation from its first page. | | `TelemetryError` | The collector refuses a request: `status` is the HTTP status to answer with, `retryAfterSeconds` when to try again. | **Functions** | Export | What it is | | - | - | | `createTelemetry()` | A single service stores diagnostics and consent state in Postgres. | | `diagnosticPattern()` | Deterministic validated diagnostics; a review label is independent of import eligibility. | | `exportMatrixPage()` | Import all validated diagnostics. | | `exportReviewedPatterns()` | Replace a downstream snapshot wholesale. | | `operatorApi()` | Server-to-server operator API. | | `saveProtocolFinding()` | Findings belong to original evidence. | | `withdrawInstallation()` | The operator route must authenticate separately before omitting the installation key hash. | **Constants** | Export | What it is | | - | - | | `CONTACT_CONFIRMATION_MILLISECONDS` | How long an emailed confirmation link works. | ### Also exported (14) `cleanupInstallation()` `cleanupWithdrawals()` `ContactMessage` `DAILY_BATCH_LIMIT` `Database` `investigate()` `MatrixSource` `ProtocolFinding` `resendContactSender()` `RETENTION_DAYS` `reviewDiagnostic()` `Row` `TelemetryOptions` `Transaction` ## @darkgrade/slate/telemetry/postgres packages/slate/src/telemetry/server/postgres.ts The collector's Postgres database. Needs the optional peer dependency `pg`. ```typescript import { postgresDatabase } from '@darkgrade/slate/telemetry/postgres' ``` **Functions** | Export | What it is | | - | - | | `postgresDatabase()` | Private operational state, flat diagnostic events, and per-session summaries kept current at ingest. | **Constants** | Export | What it is | | - | - | | `unidentifiedPurges` | One-time removal requested on 2026-11-14: events recorded with no camera identity before Slate learned to read it (the first commands of every connection that could not be matched to a session identity, and whole native Sony sessions). | Also exported: `unidentifiedPurge` ## Related > [card] [Camera](https://darkgrade.com/docs/slate/getting_started/camera.md) > > The class: constructor, every method, what each returns and throws. > [card] [Settings](https://darkgrade.com/docs/slate/reference/settings.md) > > Every setting id with its values, getter, setter and vendor properties. > [card] [Types](https://darkgrade.com/docs/slate/reference/types.md) > > Every exported type, field by field. > [card] [Errors](https://darkgrade.com/docs/slate/reference/errors.md) > > Every error class: when it is thrown and what to do.