# `HistoryGroupOptions.actor`

> 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.

Property of [`HistoryGroupOptions`](HistoryGroupOptions.md) · stable · since 2.0.0

```ts
actor?: Actor;
```

Writes passing this group as `expectGroup` default to this actor (one that passes `actor`
keeps its own; a write that passes neither is 'app', a drag's runtime commit 'shopper').
'assistant': a 'shopper' write called while it is open ends this group ([`History.group`](History.group.md)). A
'shopper' write ends no other group. For a shopper's gesture over time (a slider, a drag the
app commits), open the group with `actor: 'shopper'`: its writes are then recorded as the
shopper's, in the feed and the audit beacon, and the gesture's own writes keep it open.

**Default:** 'app'

## 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/05-HistoryGroupOptions.actor.ts`):

```ts
import type { HistoryGroup, Session } from '@holostep-configurators/runtime-client/contract';
declare const session: Session;
declare const signal: AbortSignal;
// A slider: the values while it is held are one 'Width' undo step, the shopper's.
declare const slider: HTMLInputElement;
declare const nodeId: string;
let gesture: HistoryGroup | null = null;
let latest: AbortController | null = null;
slider.addEventListener('pointerdown', () => {
  gesture = session.history.group({ label: 'Width', actor: 'shopper', signal });
});
slider.addEventListener('input', () => {
  latest?.abort();                                   // newest wins, with no timer
  latest = new AbortController();
  // in the gesture, actor 'shopper' comes from the group; a key press is its own step
  const owner = gesture ? { expectGroup: gesture } : { actor: 'shopper' as const };
  const value = { x: Number(slider.value), y: 1, z: 1 };
  session.applyPatch([{ op: 'replace', path: `/model/node/${nodeId}/scale`, value }], {
    ...owner, origin: 'width-slider', signal: latest.signal,
  }).catch((e: unknown) => {
    if ((e as Error).name !== 'AbortError') console.warn(e);   // aborted: a newer value won
  });
});
slider.addEventListener('pointerup', () => {
  gesture?.commit();                                 // release: the step is complete
  gesture = null;
});
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `actor` 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) |
