# `KnownCapability`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Type · `import type { KnownCapability } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 19. Info and capabilities

Capability ids, one per capability in the coverage ledger (`coverage.json`). Three forms:
- a member: its access path ('input.startDrag'; [`Frame`](Frame.md) members as 'frame.<member>');
- an option or argument value of a member: the path, the option's field name and, where it
  matters, the value ('camera.limits.minAzimuthDeg', 'camera.mode.pan', 'export.format.usdz');
- a spec feature: `spec.<kind>.<field>[.<value>]` ('spec.shape.polygon').
Not every member has an id. Gate A fails when an id names nothing in the declaration.

## Declaration

```ts
export type KnownCapability = 'transaction' | 'beforeCommit' | 'undo' | 'redo' | 'history.group' | 'applyPatch' | 'apply' | 'state' | 'node' | 'capture' | 'capture.source.displayed' | 'capture.view' | 'export.format.glb' | 'export.format.usdz' | 'activateAR' | 'activateAR.usdzUrl' | 'activateAR.scale.fixed' | 'activateAR.occlusion' | 'activateAR.overlayRoot' | 'activateAR.ui.headless' | 'info.ar' | 'canTryOn' | 'tryOn' | 'tryOn.mode.handoff' | 'endAR' | 'info.scene' | 'describe' | 'onFrame' | 'onFrame.phase.late' | 'frame.camera' | 'input.pick' | 'input.raycast' | 'input.drag' | 'input.drag.constrain' | 'input.drag.commit.app' | 'input.startDrag' | 'input.revert' | 'assembly.attach' | 'assembly.candidates' | 'overlays.hotspots' | 'overlays.anchors' | 'overlays.dimensions' | 'overlays.dimensions.per.part' | 'overlays.dimensions.per.node' | 'animations.reset' | 'animations.pause' | 'animations.items' | 'follow' | 'camera.limits.minAzimuthDeg' | 'camera.limits.maxAzimuthDeg' | 'camera.limits.target' | 'camera.limits.collision' | 'camera.limits.touchpadDollyScale' | 'camera.limits.panAxes' | 'camera.limits.rotateSpeed' | 'camera.limits.dollySpeed' | 'camera.limits.panSpeed' | 'camera.limits.dollyToCursor' | 'camera.limits.gestures' | 'camera.limits.coarsePointerDollyScale' | 'camera.limits.coarsePointerPanScale' | 'camera.mode.pan' | 'camera.lens.durationMs' | 'camera.autoRotate' | 'spec.shape.box' | 'spec.shape.box.cornerRadius' | 'spec.shape.cylinder' | 'spec.shape.sphere' | 'spec.shape.plane' | 'spec.shape.polygon' | 'spec.shape.extrude' | 'spec.shape.mesh' | 'spec.shape.transform' | 'spec.material.side' | 'spec.material.exactColor' | 'spec.material.alphaMode.mask' | 'spec.material.transmission' | 'spec.material.labs.drawOrder' | 'spec.material.labs.depthPrepass' | 'spec.material.labs.envIntensity' | 'spec.material.variant' | 'spec.texture.image' | 'spec.texture.sampling' | 'spec.texture.uv.3' | 'spec.texture.none' | 'spec.texture.placement' | 'spec.part.outline' | 'spec.node.space' | 'spec.stage.grade.saturation' | 'spec.stage.toneMapping.curve' | 'spec.stage.background.panorama' | 'spec.stage.environment.room' | 'spec.stage.ground.shadow.on' | 'stage.set.fadeMs' | 'labs.geometry.read' | 'labs.geometry.write' | 'labs.skin' | 'labs.decal' | 'labs.fire' | 'labs.lightLinking' | 'labs.mirror' | 'labs.shading' | 'labs.prefetch';
```

## Example

Imports: values (`has`, `validate`, the `Holo*Error` classes, the pure helpers) from `@holostep-configurators/runtime-client`, types from `@holostep-configurators/runtime-client/contract`, `/math` and `/testing` names from those entries; `boot` from the runtime module the root's `loadRuntimeAtFloor` resolves to. A type your page defines is your app's: declare it there, never import it from the package.

Compiled under the contract's strict settings (`examples/declaration/19-KnownCapability.ts`):

```ts
import type { Session } from '@holostep-configurators/runtime-client/contract';
declare const session: Session;
declare const signal: AbortSignal;
// A theme crossfade where the runtime has stage fades, an instant switch where it has none.
const theme = session.collection('theme', { role: 'helper' });
const fadeMs = session.supports('stage.set.fadeMs') ? 300 : 0;
await session.stage.set({ background: '#f4efe6' }, { owner: theme, fadeMs });
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `KnownCapability` names no product |
| 2. A precedent | not recorded: no ledger row (coverage.json) names this member or its owner |
| 3. Two apps, or labs | not recorded: no ledger row names this member or its owner |
| 4. The cheaper fix first | not recorded per member (Appendix B decides it per need) |
