# zidane-ui/machines

Import: `import { … } from 'zidane-ui/machines'`. Source: [ui/src/machines/index.ts](https://github.com/Tahul/zidane/blob/main/ui/src/machines/index.ts).

## Components

### `AddServerForm`

Component.

Renders the add-a-server form.

```ts
function AddServerForm(props: AddServerFormProps): Element | null
```

**Parameters**

- `props` (`AddServerFormProps`): The cancel and added callbacks, an id prefix, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the form.
- `idPrefix?` (`string`): The fields' id prefix (two forms on one page). Default `host`.
- `onAdded` (`(result: { host?: HostSummary; latencyMs?: number; name: string; ok: true; serverVersion?: string }) => void | Promise<void>`): Called after the server was saved.
- `onCancel` (`() => void`): Called when the user cancels.
- `style?` (`CSSProperties`): Inline styles on the form.

Source: [ui/src/machines/AddServerForm.tsx:35](https://github.com/Tahul/zidane/blob/main/ui/src/machines/AddServerForm.tsx#L35)

### `CapabilitiesView`

Component.

Renders the full check: OS and free disk, each tool found or missing with its version, the sandbox, the
environment kinds and what the host allows, with Re-check.

```ts
function CapabilitiesView(props: CapabilitiesViewProps): Element
```

**Parameters**

- `props` (`CapabilitiesViewProps`): [`CapabilitiesViewProps`](https://zidane.si/docs/reference/ui-machines.md#CapabilitiesViewProps).

**Returns** `Element`

**Props**

- `caps` (`HostCapabilities | null`): The host's capabilities; `null` while the first check is out.
- `checking` (`boolean`): A check is out (the Re-check button waits).
- `className?` (`string`): Classes merged on the root.
- `error` (`MachinesError | null`): Why the last check failed.
- `installed?` (`{ name: string; ok: boolean; output: string } | null`): How the last install went: its output shows under the tools when it failed.
- `installing?` (`string | null`): The tool being installed.
- `installRestricted?` (`boolean`): This connection may not install (a chat token): Install shows, Admin only.
- `local?` (`boolean`): This computer: it serves no clients, so what it allows is not listed.
- `onInstall?` (`(name: string) => void`): Installs a missing tool there. Absent: a missing tool offers nothing.
- `onRecheck` (`() => void`): Probes again.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/HostCapabilities.tsx:202](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostCapabilities.tsx#L202)

### `CapabilityTags`

Component.

Renders the tags a host's row shows: a few tools and cloud kinds, then "+N".

```ts
function CapabilityTags(props: CapabilityTagsProps): Element | null
```

**Parameters**

- `props` (`CapabilityTagsProps`): [`CapabilityTagsProps`](https://zidane.si/docs/reference/ui-machines.md#CapabilityTagsProps).

**Returns** `Element | null`

**Props**

- `caps` (`HostCapabilities | null`): The host's capabilities; nothing shows without them or for an older server's partial answer.

Source: [ui/src/machines/HostCapabilities.tsx:110](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostCapabilities.tsx#L110)

### `ComposerNotice`

Component.

A dismissable notice above the composer: why a new chat could not be created (its server went offline, …).

```ts
function ComposerNotice(props: ComposerNoticeProps): Element
```

**Parameters**

- `props` (`ComposerNoticeProps`): The text, the dismiss callback, a test id, `className` and `style`.

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the root.
- `onDismiss` (`() => void`): Called when the user dismisses it.
- `style?` (`CSSProperties`): Inline styles on the root.
- `testId?` (`string`): The root's `data-testid`. Default `composer-notice`.
- `text` (`string`): What happened.

Source: [ui/src/machines/Banners.tsx:92](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L92)

### `CopyText`

Component.

Text that copies itself on click, and says so for a moment.

```ts
function CopyText(props: CopyTextProps): Element
```

**Parameters**

- `props` (`CopyTextProps`): The text, `field`, `className` and `style`.

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the button.
- `field?` (`boolean`): Shown as a full-width field (a well), not inline text.
- `style?` (`CSSProperties`): Inline styles on the button.
- `text` (`string`): The text shown and copied.

Source: [ui/src/machines/ServerCard.tsx:78](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L78)

### `DaemonMenu`

Component.

Renders the daemon dot and its menu. Nothing without the host's `daemon`.

```ts
function DaemonMenu(props: DaemonMenuProps): Element | null
```

**Parameters**

- `props` (`DaemonMenuProps`): The orb's counts, the app's session callbacks, the daemon mode toggle, `className` and `style`.

**Returns** `Element | null`

**Props**

- `attention?` (`number`): Sessions waiting for the user, for the orb.
- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before "Restart daemon now". Default: the provider's confirm.
- `daemonMode?` (`boolean`): Daemon mode is on: the toggle row offers to turn it off.
- `onDaemonModeChange?` (`(on: boolean) => void`): Turns daemon mode on or off. Absent: no toggle row.
- `onOpenSession?` (`(sessionId: string) => void`): Opens a session the daemon holds. Absent: its row does nothing.
- `running?` (`number`): Runs on the daemon now, for the orb.
- `sessionTitle?` (`(sessionId: string) => string`): A session's title for its row and the diagnostics. Default: the first 8 characters of its id.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/DaemonMenu.tsx:104](https://github.com/Tahul/zidane/blob/main/ui/src/machines/DaemonMenu.tsx#L104)

### `HostRemovedBanner`

Component.

The chat that was open closed because its server was removed.

```ts
function HostRemovedBanner(props: HostRemovedBannerProps): Element
```

**Parameters**

- `props` (`HostRemovedBannerProps`): The notice, the dismiss callback, `className` and `style`.

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the root.
- `notice` (`string`): What was removed (`"<server> was removed"`).
- `onDismiss` (`() => void`): Called when the user dismisses it.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/Banners.tsx:127](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L127)

### `HostSignIn`

Component.

Renders a sign-in on a server from start to end.

```ts
function HostSignIn(props: HostSignInProps): Element | null
```

**Parameters**

- `props` (`HostSignInProps`): The server, the target and its label, `onDone`, `onClose`, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the root.
- `hostId` (`string`): The server.
- `hostName` (`string`): Its name, for the lines.
- `label` (`string`): What is being signed in to, for the lines.
- `onClose` (`() => void`): Closes the strip (Cancel or Close).
- `onDone?` (`() => void`): The server stored the tokens.
- `style?` (`CSSProperties`): Inline styles on the root.
- `target` (`HostSignInTarget`): What to sign in to there. Read once, when the sign-in starts.

Source: [ui/src/machines/HostSignIn.tsx:40](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostSignIn.tsx#L40)

### `HostsSection`

Component.

Renders the hosts list, the add form and a host's page.

```ts
function HostsSection(props: HostsSectionProps): Element
```

**Parameters**

- `props` (`HostsSectionProps`): `confirm`, `now`, `className` and `style`.

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before removing a server, installing an update, copying a secret. Default: the provider's confirm.
- `now?` (`number`): "Now" for the relative dates (screenshots). Default: the clock.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/HostsSection.tsx:54](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostsSection.tsx#L54)

### `HostSyncPanel`

Component.

Renders a server's settings sync from this computer.

```ts
function HostSyncPanel(props: HostSyncPanelProps): Element | null
```

**Parameters**

- `props` (`HostSyncPanelProps`): The server, `confirm`, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before copying a secret or taking over. Default: the provider's confirm.
- `host` (`HostSummary`): The server.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/HostSyncPanel.tsx:82](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostSyncPanel.tsx#L82)

### `MachinesProvider`

Component.

Provides a [`MachinesHost`](https://zidane.si/docs/reference/ui-machines-headless.md#MachinesHost), optional label overrides and a confirm to the machines components below it.

```ts
function MachinesProvider(props: MachinesProviderProps): Element
```

**Parameters**

- `props` (`MachinesProviderProps`): Provider props: the `host`, optional `labels` and `confirm`, and the `children` to render.

**Returns** `Element`

**Props**

- `children` (`ReactNode`): The components that read from `host`.
- `confirm?` (`MachinesConfirm`): Asks before a destructive action, on the app's modal layer. Default: a `ConfirmDialog` on the provider's own overlay.
- `host` (`MachinesHost`): The host the machines components read from and act through.
- `labels?` (`Partial<{ machinesAccess: (scope: string) => 'Admin access' | 'Chat access'; machinesAdd: string; machinesAdding: string; machinesAddServer: string; machinesAdminOnly: string; machinesAgo: (short: string) => string; machinesAutoUpdateTitle: string; machinesCancel: string; machinesCapabilitiesTitle: string; machinesCapsAsMachine: string; machinesCapsAvailable: string; machinesCapsAvailableA11y: string; machinesCapsChecking: string; machinesCapsClone: string; machinesCapsCreateFolders: string; machinesCapsEnvAvailable: string; machinesCapsFeatures: string; machinesCapsFree: (bytes: number) => string; machinesCapsInstall: string; machinesCapsInstallCopy: (command: string) => string; machinesCapsInstallCopyLabel: (tool: string) => string; machinesCapsInstalled: (tool: string) => string; machinesCapsInstallFailed: (tool: string) => string; machinesCapsInstalling: string; machinesCapsInstallLabel: (tool: string) => string; machinesCapsInstallPage: string; machinesCapsInstallPageLabel: (tool: string) => string; machinesCapsMissing: string; machinesCapsMissingA11y: string; machinesCapsMore: (count: number) => string; machinesCapsNotAvailable: string; machinesCapsOs: Record<string, string>; machinesCapsPartial: string; machinesCapsRecheck: string; machinesCapsRemoteInstalls: string; machinesCapsSandbox: string; machinesCapsSync: string; machinesCapsTools: string; machinesChangeUrl: string; machinesChangingUrl: string; machinesCheckError: (error: HostCheckError, message: string) => string; machinesConnectingTo: (name: string) => string; machinesCopiedText: (text: string) => string; machinesCopy: string; machinesCopyText: (text: string) => string; machinesDaemon: string; machinesDaemonActions: string; machinesDaemonConnected: string; machinesDaemonConnecting: string; machinesDaemonCopied: string; machinesDaemonCopy: string; machinesDaemonCopying: string; machinesDaemonDays: (days: number) => string; machinesDaemonHours: (hours: number, minutes: number) => string; machinesDaemonMenu: (health: string) => string; machinesDaemonMinutes: (minutes: number) => string; machinesDaemonModeOff: string; machinesDaemonModeOffHint: string; machinesDaemonModeOn: string; machinesDaemonModeOnHint: string; machinesDaemonNewer: string; machinesDaemonNewerDetail: (versions: string) => string; machinesDaemonOff: string; machinesDaemonOffDetail: string; machinesDaemonOlder: string; machinesDaemonOlderDetail: (versions: string) => string; machinesDaemonOnIt: string; machinesDaemonPid: (pid: number) => string; machinesDaemonProtocol: (version: number) => string; machinesDaemonReconnect: string; machinesDaemonReconnected: string; machinesDaemonReconnectHint: string; machinesDaemonReconnecting: string; machinesDaemonRefused: string; machinesDaemonRelaunch: string; machinesDaemonRelaunchHint: string; machinesDaemonRestart: string; machinesDaemonRestartDeferred: string; machinesDaemonRestarted: string; machinesDaemonRestartHint: string; machinesDaemonRestarting: string; machinesDaemonRestartNow: string; machinesDaemonRestartNowConfirm: string; machinesDaemonRestartNowHint: string; machinesDaemonRetiring: string; machinesDaemonRetiringDetail: string; machinesDaemonRetrying: string; machinesDaemonRunning: string; machinesDaemonStop: string; machinesDaemonStopAll: string; machinesDaemonStopped: (title: string) => string; machinesDaemonStoppedAll: (count: number | void) => string; machinesDaemonStopping: string; machinesDaemonStoppingAll: string; machinesDaemonUnreachable: string; machinesDaemonUp: (uptime: string) => string; machinesDaemonVersions: (daemon: number, window: number) => string; machinesDaemonWaitingForYou: string; machinesDeviceToken: string; machinesDeviceTokenPlaceholder: string; machinesDismiss: string; machinesError: (error: MachinesError) => string; machinesFactConnected: (ago: string) => string; machinesFactScope: (scope: string) => string; machinesFactServerName: (name: string) => string; machinesFactUptime: (uptime: string) => string; machinesFactVersion: (version: string) => string; machinesFolders: string; machinesForget: string; machinesForgetLabel: (machine: string) => string; machinesForgetMessage: (name: string) => string; machinesForgetTitle: (machine: string) => string; machinesGetAdmin: string; machinesGetAdminCopy: string; machinesGetAdminPairNext: string; machinesGetAdminRun: string; machinesGetAdminSave: string; machinesGetAdminSaved: string; machinesGetAdminSaving: string; machinesGetAdminToken: string; machinesGetAdminTokenField: string; machinesGpus: string; machinesHostActions: (name: string) => string; machinesHostName: string; machinesHostRemoved: (notice: string) => string; machinesHostStatuses: { 'auth-refused': string; connected: string; connecting: string; identity: string; local: string; offline: string; reconnecting: string; 'version-mismatch': string }; machinesHostsTitle: string; machinesInviteCommand: string; machinesInviteCopy: string; machinesInviteCreate: string; machinesInviteCreating: string; machinesInviteDone: string; machinesInviteExpires: (time: string) => string; machinesInviteForm: string; machinesInviteHint: string; machinesInviteName: string; machinesInviteNamePlaceholder: string; machinesInviteNameRule: string; machinesInviteNeedsAdmin: string; machinesInviteOpen: string; machinesInviteTitle: (name: string) => string; machinesLinkOff: string; machinesListEmpty: string; machinesListNotPermitted: string; machinesListTitle: (name: string) => string; machinesLocalDescription: string; machinesMachinesTitle: string; machinesNameOptional: string; machinesOfflineAuthRefused: (name: string) => string; machinesOfflineConnecting: (name: string) => string; machinesOfflineIdentity: (name: string) => string; machinesOfflineOther: (name: string, status: string) => string; machinesOfflineRemoved: (name: string) => string; machinesOfflineSince: (when: string) => string; machinesOfflineVersion: (name: string, error?: string) => string; machinesOkLine: (name: string, version?: string, latencyMs?: number) => string; machinesOpenHost: (name: string) => string; machinesRemove: string; machinesRemoveFailed: (name: string, detail: string) => string; machinesRemoveMessage: string; machinesRemoveTitle: (name: string) => string; machinesRemoving: string; machinesRename: string; machinesRenaming: string; machinesRetry: string; machinesSave: string; machinesSavedHostsError: (detail: string) => string; machinesServerUrl: string; machinesServerUrlPlaceholder: string; machinesShareAddFolder: string; machinesShared: (roots: string, name: string) => string; machinesShareFolders: string; machinesShareForm: string; machinesShareHint: (name: string) => string; machinesShareName: (name: string) => string; machinesShareNamePlaceholder: string; machinesShareOpen: string; machinesShareStart: string; machinesShareStop: string; machinesShareTitle: (name: string) => string; machinesShareToken: string; machinesShareTokenPlaceholder: string; machinesSharing: (name: string) => string; machinesStatus: (status: 'online' | 'offline') => 'online' | 'offline'; machinesStopping: string; machinesSyncAccounts: string; machinesSyncAgain: string; machinesSyncApiKey: string; machinesSyncBlocked: (reason: SyncBlockedReason, name: string) => string; machinesSyncCategories: Record<SyncCategory, { description: string; label: string }>; machinesSyncComplete: string; machinesSyncCopyKey: (label: string) => string; machinesSyncEditedHere: (device: string) => string; machinesSyncEditedOn: (name: string) => string; machinesSyncEditedOnTitle: (name: string) => string; machinesSyncEnvConfirm: string; machinesSyncEnvMessage: (name: string) => string; machinesSyncEnvTitle: (name: string) => string; machinesSyncFrom: (device: string) => string; machinesSyncKeyConfirm: string; machinesSyncKeyMessage: (name: string) => string; machinesSyncKeyTitle: (label: string, name: string) => string; machinesSyncMode: string; machinesSyncModeDescription: (device: string | undefined, name: string) => string; machinesSyncModes: Record<SyncMode, string>; machinesSyncMoreLines: (count: number) => string; machinesSyncNoAccounts: string; machinesSyncNotPushed: string; machinesSyncNotSyncable: (list: string) => string; machinesSyncNotSynced: string; machinesSyncOffline: string; machinesSyncOnHost: (name: string) => string; machinesSyncOutcomeDetails: (label: string) => string; machinesSyncPartial: string; machinesSyncPushed: (ago: string) => string; machinesSyncPushing: string; machinesSyncPushNow: string; machinesSyncSetUpOn: (name: string) => string; machinesSyncSignedInThere: string; machinesSyncSignIn: (label: string) => string; machinesSyncSignInThere: string; machinesSyncStartsWithHosts: string; machinesSyncStaysHere: string; machinesSyncStdio: (name: string, list: string) => string; machinesSyncSyncedFrom: (device: string) => string; machinesSyncTakeOver: string; machinesSyncTakeOverMessage: (name: string, other: string) => string; machinesSyncTakeOverTitle: (name: string) => string; machinesSyncTitle: string; machinesSyncTooOld: string; machinesSyncWaiting: string; machinesSyncWaitingList: (categories: string) => string; machinesSyncWarnings: string; machinesSyncWhat: string; machinesTest: string; machinesTesting: string; machinesThisApp: string; machinesThisServer: string; machinesTokensCreate: string; machinesTokensCreated: (name: string) => string; machinesTokensCreatedAt: (ago: string) => string; machinesTokensCreating: string; machinesTokensEmpty: string; machinesTokensExpired: string; machinesTokensExpires: (date: string) => string; machinesTokensList: string; machinesTokensName: string; machinesTokensNamePlaceholder: string; machinesTokensNeverUsed: string; machinesTokensRevoke: string; machinesTokensRevoked: string; machinesTokensRevokeLabel: (name: string) => string; machinesTokensRevokeMessage: string; machinesTokensRevokeTitle: (name: string) => string; machinesTokensScope: string; machinesTokensScopes: Record<ServerTokenScope, string>; machinesTokensUsed: (ago: string) => string; machinesUpdateCheck: string; machinesUpdateChecking: string; machinesUpdateFrom: (version: string) => string; machinesUpdateInstall: string; machinesUpdateInstallMessage: string; machinesUpdateInstallTitle: (latest?: string) => string; machinesUpdateOff: string; machinesUpdateOn: string; machinesUpdateOtherWay: string; machinesUpdateOut: (version: string) => string; machinesUpdateRolledBack: (version: string) => string; machinesUpdateStateChecking: string; machinesUpdateStateDownloading: (latest?: string) => string; machinesUpdateStateError: string; machinesUpdateStateInstalling: (latest?: string) => string; machinesUpdateStateReady: (latest?: string) => string; machinesUpdateStateWaiting: (latest?: string) => string; machinesUpdateStateWaitingOn: (latest: string | undefined, blockers: readonly ('work' | 'terminals')[], since: string) => string; machinesUpdateTurnOff: string; machinesUpdateTurnOn: string; machinesUpdateUnsupported: (name: string) => string; machinesUpdateUpToDate: string; machinesUpdateVersion: (version: string) => string; machinesUrlChanged: (name: string, url: string) => string; machinesUse: string; machinesUseHint: (name: string) => string; machinesUseMachineName: (machine: string) => string; machinesUseNotLent: (name: string) => string; machinesUseStop: string; machinesUseTitle: (name: string) => string; machinesVersion: (version: string) => string; machinesVersionDiffers: (version: string, server: string) => string; machinesWaiting: (machine: string) => string }>`): Overrides for the machines components' strings. Keys you leave out keep the default English label.

Source: [ui/src/machines/MachinesProvider.tsx:59](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L59)

### `MachineWaitingBanner`

Component.

"Waiting for laptop…" while the session's run is paused on an offline machine, gone at once when the host hears
that machine came back.

```ts
function MachineWaitingBanner(props: MachineWaitingBannerProps): Element | null
```

**Parameters**

- `props` (`MachineWaitingBannerProps`): The machine waited for, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the root.
- `machine` (`string | null`): The machine the session's run waits for (from its notices, `machineWaiting` in `zidane/chat/pure`), or `null`.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/Banners.tsx:156](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L156)

### `ServerCard`

Component.

Renders a server's card: what it is and how it is, and the actions the host offers.

```ts
function ServerCard(props: ServerCardProps): Element
```

**Parameters**

- `props` (`ServerCardProps`): The server, its saved entry, the change callback, a badge, `confirm`, `className` and `style`.

**Returns** `Element`

**Props**

- `badge?` (`ReactNode`): Shown after the status dot and chip (a sync outcome badge).
- `className?` (`string`): Extra classes on the card.
- `confirm?` (`MachinesConfirm`): Asks before Remove. Default: the provider's confirm.
- `host` (`HostSummary`): The server, with its live status.
- `now?` (`number`): The current time for the facts, epoch ms. Default: now.
- `onChanged?` (`() => void | Promise<void>`): Called after a test, rename, URL change or removal changed what the host holds.
- `saved?` (`HostSummary`): The saved entry, for the dates the live status lacks (`lastConnectedAt`). Default: `host`.
- `style?` (`CSSProperties`): Inline styles on the card.

Source: [ui/src/machines/ServerCard.tsx:134](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L134)

### `ServerMachinesPanel`

Component.

Renders a server's machine links and machines.

```ts
function ServerMachinesPanel(props: ServerMachinesPanelProps): Element
```

**Parameters**

- `props` (`ServerMachinesPanelProps`): The server, `confirm`, `className` and `style`.

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before Forget. Default: the provider's confirm.
- `host` (`HostSummary`): The server.
- `now?` (`number`): The current time for "last seen", epoch ms. Default: now.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/ServerMachinesPanel.tsx:214](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerMachinesPanel.tsx#L214)

### `ServerOfflineBanner`

Component.

Replaces the composer while the session's server can't be reached: why, and Retry (when the host can retry and a
retry can help).

```ts
function ServerOfflineBanner(props: ServerOfflineBannerProps): Element
```

**Parameters**

- `props` (`ServerOfflineBannerProps`): The server, a fallback name, `className` and `style`.

**Returns** `Element`

**Props**

- `className?` (`string`): Extra classes on the root.
- `host` (`HostSummary | undefined`): The session's server, or `undefined` when it is no longer saved.
- `name?` (`string`): The name to use when the server is gone. Default: the `machinesThisServer` label.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/Banners.tsx:37](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L37)

### `ServerUpdatePanel`

Component.

Renders a server's auto-update state and actions.

```ts
function ServerUpdatePanel(props: ServerUpdatePanelProps): Element | null
```

**Parameters**

- `props` (`ServerUpdatePanelProps`): The server, `confirm`, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before Install now. Default: the provider's confirm.
- `host` (`HostSummary`): The server.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/ServerUpdatePanel.tsx:44](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerUpdatePanel.tsx#L44)

### `SyncAccounts`

Component.

Renders this computer's accounts against the server's.

```ts
function SyncAccounts(props: SyncAccountsProps): Element
```

**Parameters**

- `props` (`SyncAccountsProps`): The server, the accounts, the copied keys, `onToggleKey`, `className` and `style`.

**Returns** `Element`

**Props**

- `accounts` (`readonly HostSyncAccount[]`): This computer's providers with an API key or a sign-in (`HostSyncState.local.accounts`).
- `className?` (`string`): Extra classes on the root.
- `host` (`HostSummary`): The server.
- `keys` (`readonly string[]`): Providers whose API key is copied.
- `onToggleKey` (`(provider: { key: string; label: string }) => void`): A key's box was ticked or unticked.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/SyncAccounts.tsx:59](https://github.com/Tahul/zidane/blob/main/ui/src/machines/SyncAccounts.tsx#L59)

### `SyncMarker`

Component.

Renders where a server's setting came from, or nothing when sync never wrote it.

```ts
function SyncMarker(props: SyncMarkerProps): Element | null
```

**Parameters**

- `props` (`SyncMarkerProps`): The server, its record, the setting's key, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the root.
- `hostId` (`string`): The server whose setting it is.
- `settingKey` (`string`): The setting's key (`approvalMode`).
- `status` (`SyncStatus | null`): The server's sync record (`useServerSyncStatus`).
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/SyncMarker.tsx:51](https://github.com/Tahul/zidane/blob/main/ui/src/machines/SyncMarker.tsx#L51)

### `SyncOutcomeBadge`

Component.

Renders a server's last push outcome, or nothing.

```ts
function SyncOutcomeBadge(props: SyncOutcomeBadgeProps): Element | null
```

**Parameters**

- `props` (`SyncOutcomeBadgeProps`): The sync `state`, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the root.
- `state` (`HostSyncState | null`): The server's sync state (`MachinesHost.sync.state`); `null` shows nothing.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/SyncOutcomeBadge.tsx:48](https://github.com/Tahul/zidane/blob/main/ui/src/machines/SyncOutcomeBadge.tsx#L48)

### `TokensPanel`

Component.

Renders a server's tokens and the create form. Nothing without the host's `tokens`, or while the connection's
permissions are not known.

```ts
function TokensPanel(props: TokensPanelProps): Element | null
```

**Parameters**

- `props` (`TokensPanelProps`): The server, `confirm`, `className` and `style`.

**Returns** `Element | null`

**Props**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before Revoke. Default: the provider's confirm.
- `host` (`HostSummary`): The server whose tokens to manage.
- `now?` (`number`): The current time for the dates, epoch ms. Default: now.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/TokensPanel.tsx:56](https://github.com/Tahul/zidane/blob/main/ui/src/machines/TokensPanel.tsx#L56)

## Functions

### `escapeCancels`

Function.

Escape inside an inline form closes that form, not the dialog around it.

```ts
function escapeCancels(cancel: () => void): (event: KeyboardEvent) => void
```

**Parameters**

- `cancel` (`() => void`): Closes the form.

**Returns** `(event: KeyboardEvent) => void`

Source: [ui/src/machines/ServerCard.tsx:53](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L53)

### `hostsSettingsSection`

Function.

The Hosts section, over the nearest `MachinesProvider`.

```ts
function hostsSettingsSection(
  props?: HostsSectionProps,
  overrides?: PreferenceSectionOverrides,
): SettingsSection
```

**Parameters**

- `props?` (`HostsSectionProps`, default `{}`): What [`HostsSection`](https://zidane.si/docs/reference/ui-machines.md#HostsSection) takes (`confirm`, `now`).
- `overrides?` (`PreferenceSectionOverrides`, default `{}`): The title, description or group, instead of the layout's.

**Returns** `SettingsSection`

Source: [ui/src/machines/settings-section.tsx:20](https://github.com/Tahul/zidane/blob/main/ui/src/machines/settings-section.tsx#L20)

### `useHostCapabilities`

Function.

A host's capabilities. Nothing is asked while `enabled` is false (an unreachable server) or without the host's
`capabilities`.

```ts
function useHostCapabilities(hostId: string, enabled?: boolean): HostCapabilitiesState
```

**Parameters**

- `hostId` (`string`): The host (`local` for This computer).
- `enabled?` (`boolean`, default `true`): Whether to ask. Default true.

**Returns** `HostCapabilitiesState`

Source: [ui/src/machines/HostCapabilities.tsx:45](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostCapabilities.tsx#L45)

### `useHostSync`

Function.

`hostId`'s sync state, kept current (re-read on every change the backend reports); `null` before the first read,
when it can't be read, or without the host's `sync.state`.

```ts
function useHostSync(
  hostId: string,
): { reload: () => Promise<void>; state: HostSyncState | null }
```

**Parameters**

- `hostId` (`string`): The server.

**Returns** `{ reload: () => Promise<void>; state: HostSyncState | null }`

Source: [ui/src/machines/HostSyncPanel.tsx:40](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostSyncPanel.tsx#L40)

### `useLentServers`

Function.

The machine names of the servers this computer uses as machines (`local@<server>`), so a picker can show those
servers once, as servers. Listens to the host's links only while `enabled`.

```ts
function useLentServers(enabled: boolean): ReadonlySet<string>
```

**Parameters**

- `enabled` (`boolean`): Whether to listen (the app has servers and shows a picker).

**Returns** `ReadonlySet<string>`

Source: [ui/src/machines/MachinesProvider.tsx:133](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L133)

### `useMachinesConfirm`

Function.

Returns how the machines components ask before a destructive action.

```ts
function useMachinesConfirm(): MachinesConfirm
```

**Returns** `MachinesConfirm`

Source: [ui/src/machines/MachinesProvider.tsx:101](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L101)

### `useMachinesHost`

Function.

Returns the [`MachinesHost`](https://zidane.si/docs/reference/ui-machines-headless.md#MachinesHost) from the nearest [`MachinesProvider`](https://zidane.si/docs/reference/ui-machines.md#MachinesProvider), or an empty host outside one.

```ts
function useMachinesHost(): MachinesHost
```

**Returns** `MachinesHost`

Source: [ui/src/machines/MachinesProvider.tsx:96](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L96)

### `useMachinesLabels`

Function.

Returns the machines components' strings: the defaults merged with any overrides given to [`MachinesProvider`](https://zidane.si/docs/reference/ui-machines.md#MachinesProvider) or `LabelsProvider`.

```ts
function useMachinesLabels(): { machinesAccess: (scope: string) => 'Admin access' | 'Chat access'; machinesAdd: string; machinesAdding: string; machinesAddServer: string; machinesAdminOnly: string; machinesAgo: (short: string) => string; machinesAutoUpdateTitle: string; machinesCancel: string; machinesCapabilitiesTitle: string; machinesCapsAsMachine: string; machinesCapsAvailable: string; machinesCapsAvailableA11y: string; machinesCapsChecking: string; machinesCapsClone: string; machinesCapsCreateFolders: string; machinesCapsEnvAvailable: string; machinesCapsFeatures: string; machinesCapsFree: (bytes: number) => string; machinesCapsInstall: string; machinesCapsInstallCopy: (command: string) => string; machinesCapsInstallCopyLabel: (tool: string) => string; machinesCapsInstalled: (tool: string) => string; machinesCapsInstallFailed: (tool: string) => string; machinesCapsInstalling: string; machinesCapsInstallLabel: (tool: string) => string; machinesCapsInstallPage: string; machinesCapsInstallPageLabel: (tool: string) => string; machinesCapsMissing: string; machinesCapsMissingA11y: string; machinesCapsMore: (count: number) => string; machinesCapsNotAvailable: string; machinesCapsOs: Record<string, string>; machinesCapsPartial: string; machinesCapsRecheck: string; machinesCapsRemoteInstalls: string; machinesCapsSandbox: string; machinesCapsSync: string; machinesCapsTools: string; machinesChangeUrl: string; machinesChangingUrl: string; machinesCheckError: (error: HostCheckError, message: string) => string; machinesConnectingTo: (name: string) => string; machinesCopiedText: (text: string) => string; machinesCopy: string; machinesCopyText: (text: string) => string; machinesDaemon: string; machinesDaemonActions: string; machinesDaemonConnected: string; machinesDaemonConnecting: string; machinesDaemonCopied: string; machinesDaemonCopy: string; machinesDaemonCopying: string; machinesDaemonDays: (days: number) => string; machinesDaemonHours: (hours: number, minutes: number) => string; machinesDaemonMenu: (health: string) => string; machinesDaemonMinutes: (minutes: number) => string; machinesDaemonModeOff: string; machinesDaemonModeOffHint: string; machinesDaemonModeOn: string; machinesDaemonModeOnHint: string; machinesDaemonNewer: string; machinesDaemonNewerDetail: (versions: string) => string; machinesDaemonOff: string; machinesDaemonOffDetail: string; machinesDaemonOlder: string; machinesDaemonOlderDetail: (versions: string) => string; machinesDaemonOnIt: string; machinesDaemonPid: (pid: number) => string; machinesDaemonProtocol: (version: number) => string; machinesDaemonReconnect: string; machinesDaemonReconnected: string; machinesDaemonReconnectHint: string; machinesDaemonReconnecting: string; machinesDaemonRefused: string; machinesDaemonRelaunch: string; machinesDaemonRelaunchHint: string; machinesDaemonRestart: string; machinesDaemonRestartDeferred: string; machinesDaemonRestarted: string; machinesDaemonRestartHint: string; machinesDaemonRestarting: string; machinesDaemonRestartNow: string; machinesDaemonRestartNowConfirm: string; machinesDaemonRestartNowHint: string; machinesDaemonRetiring: string; machinesDaemonRetiringDetail: string; machinesDaemonRetrying: string; machinesDaemonRunning: string; machinesDaemonStop: string; machinesDaemonStopAll: string; machinesDaemonStopped: (title: string) => string; machinesDaemonStoppedAll: (count: number | void) => string; machinesDaemonStopping: string; machinesDaemonStoppingAll: string; machinesDaemonUnreachable: string; machinesDaemonUp: (uptime: string) => string; machinesDaemonVersions: (daemon: number, window: number) => string; machinesDaemonWaitingForYou: string; machinesDeviceToken: string; machinesDeviceTokenPlaceholder: string; machinesDismiss: string; machinesError: (error: MachinesError) => string; machinesFactConnected: (ago: string) => string; machinesFactScope: (scope: string) => string; machinesFactServerName: (name: string) => string; machinesFactUptime: (uptime: string) => string; machinesFactVersion: (version: string) => string; machinesFolders: string; machinesForget: string; machinesForgetLabel: (machine: string) => string; machinesForgetMessage: (name: string) => string; machinesForgetTitle: (machine: string) => string; machinesGetAdmin: string; machinesGetAdminCopy: string; machinesGetAdminPairNext: string; machinesGetAdminRun: string; machinesGetAdminSave: string; machinesGetAdminSaved: string; machinesGetAdminSaving: string; machinesGetAdminToken: string; machinesGetAdminTokenField: string; machinesGpus: string; machinesHostActions: (name: string) => string; machinesHostName: string; machinesHostRemoved: (notice: string) => string; machinesHostStatuses: { 'auth-refused': string; connected: string; connecting: string; identity: string; local: string; offline: string; reconnecting: string; 'version-mismatch': string }; machinesHostsTitle: string; machinesInviteCommand: string; machinesInviteCopy: string; machinesInviteCreate: string; machinesInviteCreating: string; machinesInviteDone: string; machinesInviteExpires: (time: string) => string; machinesInviteForm: string; machinesInviteHint: string; machinesInviteName: string; machinesInviteNamePlaceholder: string; machinesInviteNameRule: string; machinesInviteNeedsAdmin: string; machinesInviteOpen: string; machinesInviteTitle: (name: string) => string; machinesLinkOff: string; machinesListEmpty: string; machinesListNotPermitted: string; machinesListTitle: (name: string) => string; machinesLocalDescription: string; machinesMachinesTitle: string; machinesNameOptional: string; machinesOfflineAuthRefused: (name: string) => string; machinesOfflineConnecting: (name: string) => string; machinesOfflineIdentity: (name: string) => string; machinesOfflineOther: (name: string, status: string) => string; machinesOfflineRemoved: (name: string) => string; machinesOfflineSince: (when: string) => string; machinesOfflineVersion: (name: string, error?: string) => string; machinesOkLine: (name: string, version?: string, latencyMs?: number) => string; machinesOpenHost: (name: string) => string; machinesRemove: string; machinesRemoveFailed: (name: string, detail: string) => string; machinesRemoveMessage: string; machinesRemoveTitle: (name: string) => string; machinesRemoving: string; machinesRename: string; machinesRenaming: string; machinesRetry: string; machinesSave: string; machinesSavedHostsError: (detail: string) => string; machinesServerUrl: string; machinesServerUrlPlaceholder: string; machinesShareAddFolder: string; machinesShared: (roots: string, name: string) => string; machinesShareFolders: string; machinesShareForm: string; machinesShareHint: (name: string) => string; machinesShareName: (name: string) => string; machinesShareNamePlaceholder: string; machinesShareOpen: string; machinesShareStart: string; machinesShareStop: string; machinesShareTitle: (name: string) => string; machinesShareToken: string; machinesShareTokenPlaceholder: string; machinesSharing: (name: string) => string; machinesStatus: (status: 'online' | 'offline') => 'online' | 'offline'; machinesStopping: string; machinesSyncAccounts: string; machinesSyncAgain: string; machinesSyncApiKey: string; machinesSyncBlocked: (reason: SyncBlockedReason, name: string) => string; machinesSyncCategories: Record<SyncCategory, { description: string; label: string }>; machinesSyncComplete: string; machinesSyncCopyKey: (label: string) => string; machinesSyncEditedHere: (device: string) => string; machinesSyncEditedOn: (name: string) => string; machinesSyncEditedOnTitle: (name: string) => string; machinesSyncEnvConfirm: string; machinesSyncEnvMessage: (name: string) => string; machinesSyncEnvTitle: (name: string) => string; machinesSyncFrom: (device: string) => string; machinesSyncKeyConfirm: string; machinesSyncKeyMessage: (name: string) => string; machinesSyncKeyTitle: (label: string, name: string) => string; machinesSyncMode: string; machinesSyncModeDescription: (device: string | undefined, name: string) => string; machinesSyncModes: Record<SyncMode, string>; machinesSyncMoreLines: (count: number) => string; machinesSyncNoAccounts: string; machinesSyncNotPushed: string; machinesSyncNotSyncable: (list: string) => string; machinesSyncNotSynced: string; machinesSyncOffline: string; machinesSyncOnHost: (name: string) => string; machinesSyncOutcomeDetails: (label: string) => string; machinesSyncPartial: string; machinesSyncPushed: (ago: string) => string; machinesSyncPushing: string; machinesSyncPushNow: string; machinesSyncSetUpOn: (name: string) => string; machinesSyncSignedInThere: string; machinesSyncSignIn: (label: string) => string; machinesSyncSignInThere: string; machinesSyncStartsWithHosts: string; machinesSyncStaysHere: string; machinesSyncStdio: (name: string, list: string) => string; machinesSyncSyncedFrom: (device: string) => string; machinesSyncTakeOver: string; machinesSyncTakeOverMessage: (name: string, other: string) => string; machinesSyncTakeOverTitle: (name: string) => string; machinesSyncTitle: string; machinesSyncTooOld: string; machinesSyncWaiting: string; machinesSyncWaitingList: (categories: string) => string; machinesSyncWarnings: string; machinesSyncWhat: string; machinesTest: string; machinesTesting: string; machinesThisApp: string; machinesThisServer: string; machinesTokensCreate: string; machinesTokensCreated: (name: string) => string; machinesTokensCreatedAt: (ago: string) => string; machinesTokensCreating: string; machinesTokensEmpty: string; machinesTokensExpired: string; machinesTokensExpires: (date: string) => string; machinesTokensList: string; machinesTokensName: string; machinesTokensNamePlaceholder: string; machinesTokensNeverUsed: string; machinesTokensRevoke: string; machinesTokensRevoked: string; machinesTokensRevokeLabel: (name: string) => string; machinesTokensRevokeMessage: string; machinesTokensRevokeTitle: (name: string) => string; machinesTokensScope: string; machinesTokensScopes: Record<ServerTokenScope, string>; machinesTokensUsed: (ago: string) => string; machinesUpdateCheck: string; machinesUpdateChecking: string; machinesUpdateFrom: (version: string) => string; machinesUpdateInstall: string; machinesUpdateInstallMessage: string; machinesUpdateInstallTitle: (latest?: string) => string; machinesUpdateOff: string; machinesUpdateOn: string; machinesUpdateOtherWay: string; machinesUpdateOut: (version: string) => string; machinesUpdateRolledBack: (version: string) => string; machinesUpdateStateChecking: string; machinesUpdateStateDownloading: (latest?: string) => string; machinesUpdateStateError: string; machinesUpdateStateInstalling: (latest?: string) => string; machinesUpdateStateReady: (latest?: string) => string; machinesUpdateStateWaiting: (latest?: string) => string; machinesUpdateStateWaitingOn: (latest: string | undefined, blockers: readonly ('work' | 'terminals')[], since: string) => string; machinesUpdateTurnOff: string; machinesUpdateTurnOn: string; machinesUpdateUnsupported: (name: string) => string; machinesUpdateUpToDate: string; machinesUpdateVersion: (version: string) => string; machinesUrlChanged: (name: string, url: string) => string; machinesUse: string; machinesUseHint: (name: string) => string; machinesUseMachineName: (machine: string) => string; machinesUseNotLent: (name: string) => string; machinesUseStop: string; machinesUseTitle: (name: string) => string; machinesVersion: (version: string) => string; machinesVersionDiffers: (version: string, server: string) => string; machinesWaiting: (machine: string) => string }
```

**Returns** `{ machinesAccess: (scope: string) => 'Admin access' | 'Chat access'; machinesAdd: string; machinesAdding: string; machinesAddServer: string; machinesAdminOnly: string; machinesAgo: (short: string) => string; machinesAutoUpdateTitle: string; machinesCancel: string; machinesCapabilitiesTitle: string; machinesCapsAsMachine: string; machinesCapsAvailable: string; machinesCapsAvailableA11y: string; machinesCapsChecking: string; machinesCapsClone: string; machinesCapsCreateFolders: string; machinesCapsEnvAvailable: string; machinesCapsFeatures: string; machinesCapsFree: (bytes: number) => string; machinesCapsInstall: string; machinesCapsInstallCopy: (command: string) => string; machinesCapsInstallCopyLabel: (tool: string) => string; machinesCapsInstalled: (tool: string) => string; machinesCapsInstallFailed: (tool: string) => string; machinesCapsInstalling: string; machinesCapsInstallLabel: (tool: string) => string; machinesCapsInstallPage: string; machinesCapsInstallPageLabel: (tool: string) => string; machinesCapsMissing: string; machinesCapsMissingA11y: string; machinesCapsMore: (count: number) => string; machinesCapsNotAvailable: string; machinesCapsOs: Record<string, string>; machinesCapsPartial: string; machinesCapsRecheck: string; machinesCapsRemoteInstalls: string; machinesCapsSandbox: string; machinesCapsSync: string; machinesCapsTools: string; machinesChangeUrl: string; machinesChangingUrl: string; machinesCheckError: (error: HostCheckError, message: string) => string; machinesConnectingTo: (name: string) => string; machinesCopiedText: (text: string) => string; machinesCopy: string; machinesCopyText: (text: string) => string; machinesDaemon: string; machinesDaemonActions: string; machinesDaemonConnected: string; machinesDaemonConnecting: string; machinesDaemonCopied: string; machinesDaemonCopy: string; machinesDaemonCopying: string; machinesDaemonDays: (days: number) => string; machinesDaemonHours: (hours: number, minutes: number) => string; machinesDaemonMenu: (health: string) => string; machinesDaemonMinutes: (minutes: number) => string; machinesDaemonModeOff: string; machinesDaemonModeOffHint: string; machinesDaemonModeOn: string; machinesDaemonModeOnHint: string; machinesDaemonNewer: string; machinesDaemonNewerDetail: (versions: string) => string; machinesDaemonOff: string; machinesDaemonOffDetail: string; machinesDaemonOlder: string; machinesDaemonOlderDetail: (versions: string) => string; machinesDaemonOnIt: string; machinesDaemonPid: (pid: number) => string; machinesDaemonProtocol: (version: number) => string; machinesDaemonReconnect: string; machinesDaemonReconnected: string; machinesDaemonReconnectHint: string; machinesDaemonReconnecting: string; machinesDaemonRefused: string; machinesDaemonRelaunch: string; machinesDaemonRelaunchHint: string; machinesDaemonRestart: string; machinesDaemonRestartDeferred: string; machinesDaemonRestarted: string; machinesDaemonRestartHint: string; machinesDaemonRestarting: string; machinesDaemonRestartNow: string; machinesDaemonRestartNowConfirm: string; machinesDaemonRestartNowHint: string; machinesDaemonRetiring: string; machinesDaemonRetiringDetail: string; machinesDaemonRetrying: string; machinesDaemonRunning: string; machinesDaemonStop: string; machinesDaemonStopAll: string; machinesDaemonStopped: (title: string) => string; machinesDaemonStoppedAll: (count: number | void) => string; machinesDaemonStopping: string; machinesDaemonStoppingAll: string; machinesDaemonUnreachable: string; machinesDaemonUp: (uptime: string) => string; machinesDaemonVersions: (daemon: number, window: number) => string; machinesDaemonWaitingForYou: string; machinesDeviceToken: string; machinesDeviceTokenPlaceholder: string; machinesDismiss: string; machinesError: (error: MachinesError) => string; machinesFactConnected: (ago: string) => string; machinesFactScope: (scope: string) => string; machinesFactServerName: (name: string) => string; machinesFactUptime: (uptime: string) => string; machinesFactVersion: (version: string) => string; machinesFolders: string; machinesForget: string; machinesForgetLabel: (machine: string) => string; machinesForgetMessage: (name: string) => string; machinesForgetTitle: (machine: string) => string; machinesGetAdmin: string; machinesGetAdminCopy: string; machinesGetAdminPairNext: string; machinesGetAdminRun: string; machinesGetAdminSave: string; machinesGetAdminSaved: string; machinesGetAdminSaving: string; machinesGetAdminToken: string; machinesGetAdminTokenField: string; machinesGpus: string; machinesHostActions: (name: string) => string; machinesHostName: string; machinesHostRemoved: (notice: string) => string; machinesHostStatuses: { 'auth-refused': string; connected: string; connecting: string; identity: string; local: string; offline: string; reconnecting: string; 'version-mismatch': string }; machinesHostsTitle: string; machinesInviteCommand: string; machinesInviteCopy: string; machinesInviteCreate: string; machinesInviteCreating: string; machinesInviteDone: string; machinesInviteExpires: (time: string) => string; machinesInviteForm: string; machinesInviteHint: string; machinesInviteName: string; machinesInviteNamePlaceholder: string; machinesInviteNameRule: string; machinesInviteNeedsAdmin: string; machinesInviteOpen: string; machinesInviteTitle: (name: string) => string; machinesLinkOff: string; machinesListEmpty: string; machinesListNotPermitted: string; machinesListTitle: (name: string) => string; machinesLocalDescription: string; machinesMachinesTitle: string; machinesNameOptional: string; machinesOfflineAuthRefused: (name: string) => string; machinesOfflineConnecting: (name: string) => string; machinesOfflineIdentity: (name: string) => string; machinesOfflineOther: (name: string, status: string) => string; machinesOfflineRemoved: (name: string) => string; machinesOfflineSince: (when: string) => string; machinesOfflineVersion: (name: string, error?: string) => string; machinesOkLine: (name: string, version?: string, latencyMs?: number) => string; machinesOpenHost: (name: string) => string; machinesRemove: string; machinesRemoveFailed: (name: string, detail: string) => string; machinesRemoveMessage: string; machinesRemoveTitle: (name: string) => string; machinesRemoving: string; machinesRename: string; machinesRenaming: string; machinesRetry: string; machinesSave: string; machinesSavedHostsError: (detail: string) => string; machinesServerUrl: string; machinesServerUrlPlaceholder: string; machinesShareAddFolder: string; machinesShared: (roots: string, name: string) => string; machinesShareFolders: string; machinesShareForm: string; machinesShareHint: (name: string) => string; machinesShareName: (name: string) => string; machinesShareNamePlaceholder: string; machinesShareOpen: string; machinesShareStart: string; machinesShareStop: string; machinesShareTitle: (name: string) => string; machinesShareToken: string; machinesShareTokenPlaceholder: string; machinesSharing: (name: string) => string; machinesStatus: (status: 'online' | 'offline') => 'online' | 'offline'; machinesStopping: string; machinesSyncAccounts: string; machinesSyncAgain: string; machinesSyncApiKey: string; machinesSyncBlocked: (reason: SyncBlockedReason, name: string) => string; machinesSyncCategories: Record<SyncCategory, { description: string; label: string }>; machinesSyncComplete: string; machinesSyncCopyKey: (label: string) => string; machinesSyncEditedHere: (device: string) => string; machinesSyncEditedOn: (name: string) => string; machinesSyncEditedOnTitle: (name: string) => string; machinesSyncEnvConfirm: string; machinesSyncEnvMessage: (name: string) => string; machinesSyncEnvTitle: (name: string) => string; machinesSyncFrom: (device: string) => string; machinesSyncKeyConfirm: string; machinesSyncKeyMessage: (name: string) => string; machinesSyncKeyTitle: (label: string, name: string) => string; machinesSyncMode: string; machinesSyncModeDescription: (device: string | undefined, name: string) => string; machinesSyncModes: Record<SyncMode, string>; machinesSyncMoreLines: (count: number) => string; machinesSyncNoAccounts: string; machinesSyncNotPushed: string; machinesSyncNotSyncable: (list: string) => string; machinesSyncNotSynced: string; machinesSyncOffline: string; machinesSyncOnHost: (name: string) => string; machinesSyncOutcomeDetails: (label: string) => string; machinesSyncPartial: string; machinesSyncPushed: (ago: string) => string; machinesSyncPushing: string; machinesSyncPushNow: string; machinesSyncSetUpOn: (name: string) => string; machinesSyncSignedInThere: string; machinesSyncSignIn: (label: string) => string; machinesSyncSignInThere: string; machinesSyncStartsWithHosts: string; machinesSyncStaysHere: string; machinesSyncStdio: (name: string, list: string) => string; machinesSyncSyncedFrom: (device: string) => string; machinesSyncTakeOver: string; machinesSyncTakeOverMessage: (name: string, other: string) => string; machinesSyncTakeOverTitle: (name: string) => string; machinesSyncTitle: string; machinesSyncTooOld: string; machinesSyncWaiting: string; machinesSyncWaitingList: (categories: string) => string; machinesSyncWarnings: string; machinesSyncWhat: string; machinesTest: string; machinesTesting: string; machinesThisApp: string; machinesThisServer: string; machinesTokensCreate: string; machinesTokensCreated: (name: string) => string; machinesTokensCreatedAt: (ago: string) => string; machinesTokensCreating: string; machinesTokensEmpty: string; machinesTokensExpired: string; machinesTokensExpires: (date: string) => string; machinesTokensList: string; machinesTokensName: string; machinesTokensNamePlaceholder: string; machinesTokensNeverUsed: string; machinesTokensRevoke: string; machinesTokensRevoked: string; machinesTokensRevokeLabel: (name: string) => string; machinesTokensRevokeMessage: string; machinesTokensRevokeTitle: (name: string) => string; machinesTokensScope: string; machinesTokensScopes: Record<ServerTokenScope, string>; machinesTokensUsed: (ago: string) => string; machinesUpdateCheck: string; machinesUpdateChecking: string; machinesUpdateFrom: (version: string) => string; machinesUpdateInstall: string; machinesUpdateInstallMessage: string; machinesUpdateInstallTitle: (latest?: string) => string; machinesUpdateOff: string; machinesUpdateOn: string; machinesUpdateOtherWay: string; machinesUpdateOut: (version: string) => string; machinesUpdateRolledBack: (version: string) => string; machinesUpdateStateChecking: string; machinesUpdateStateDownloading: (latest?: string) => string; machinesUpdateStateError: string; machinesUpdateStateInstalling: (latest?: string) => string; machinesUpdateStateReady: (latest?: string) => string; machinesUpdateStateWaiting: (latest?: string) => string; machinesUpdateStateWaitingOn: (latest: string | undefined, blockers: readonly ('work' | 'terminals')[], since: string) => string; machinesUpdateTurnOff: string; machinesUpdateTurnOn: string; machinesUpdateUnsupported: (name: string) => string; machinesUpdateUpToDate: string; machinesUpdateVersion: (version: string) => string; machinesUrlChanged: (name: string, url: string) => string; machinesUse: string; machinesUseHint: (name: string) => string; machinesUseMachineName: (machine: string) => string; machinesUseNotLent: (name: string) => string; machinesUseStop: string; machinesUseTitle: (name: string) => string; machinesVersion: (version: string) => string; machinesVersionDiffers: (version: string, server: string) => string; machinesWaiting: (machine: string) => string }`

Source: [ui/src/machines/MachinesProvider.tsx:106](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L106)

### `useOnlineMachines`

Function.

The names of the machines last heard online, from every host; empty without the host's `machines`.

```ts
function useOnlineMachines(): ReadonlySet<string>
```

**Returns** `ReadonlySet<string>`

Source: [ui/src/machines/MachinesProvider.tsx:140](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L140)

### `usePermitted`

Function.

Whether the host may do `action` right now (its `permitted` store). Re-renders when that changes.

```ts
function usePermitted(action: MachinesAction): boolean
```

**Parameters**

- `action` (`MachinesAction`): The action.

**Returns** `boolean`

Source: [ui/src/machines/MachinesProvider.tsx:118](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L118)

### `usePresenceMap`

Function.

Every live session's presence, by session id (list-level decisions: ordering, counts); empty without `presence`.

```ts
function usePresenceMap(): ReadonlyMap<string, SessionPresence>
```

**Returns** `ReadonlyMap<string, SessionPresence>`

Source: [ui/src/machines/MachinesProvider.tsx:151](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L151)

### `useServerSyncStatus`

Function.

A server's sync record, kept current; `null` for This computer (`hostId` `null`), a host without `sync`, or a server
without sync.

```ts
function useServerSyncStatus(hostId: string | null): SyncStatus | null
```

**Parameters**

- `hostId` (`string | null`): The server, or `null`.

**Returns** `SyncStatus | null`

Source: [ui/src/machines/SyncMarker.tsx:27](https://github.com/Tahul/zidane/blob/main/ui/src/machines/SyncMarker.tsx#L27)

### `useSessionPresence`

Function.

One session's presence; re-renders only when that session's presence changes. `null` without `presence`.

```ts
function useSessionPresence(sessionId: string | null): SessionPresence | null
```

**Parameters**

- `sessionId` (`string | null`): The session, or `null` for none.

**Returns** `SessionPresence | null`

Source: [ui/src/machines/MachinesProvider.tsx:161](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L161)

## Constants

### `HOST_CARD_ICON_CLASS`

Constant.

The icon well of a host card.

```ts
const HOST_CARD_ICON_CLASS: 'zg-well shrink-0 inline-flex items-center justify-center size-7 rounded-zg-md text-sm text-[var(--zg-text-muted)]'
```

Source: [ui/src/machines/ServerCard.tsx:45](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L45)

### `HOST_NAME_MAX`

Constant.

The desktop app's `hosts:*` limits, mirrored so a field can't take more than it accepts.

```ts
const HOST_NAME_MAX = 200
```

Source: [ui/src/machines/ServerCard.tsx:38](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L38)

### `HOST_TOKEN_MAX`

Constant.

The longest device token the desktop app accepts.

```ts
const HOST_TOKEN_MAX = 4096
```

Source: [ui/src/machines/ServerCard.tsx:42](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L42)

### `HOST_URL_MAX`

Constant.

The longest server URL the desktop app accepts.

```ts
const HOST_URL_MAX = 2048
```

Source: [ui/src/machines/ServerCard.tsx:40](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L40)

## Interfaces

### `AddServerFormProps`

Interface.

Props for [`AddServerForm`](https://zidane.si/docs/reference/ui-machines.md#AddServerForm).

```ts
interface AddServerFormProps
```

**Properties**

- `className?` (`string`): Extra classes on the form.
- `idPrefix?` (`string`): The fields' id prefix (two forms on one page). Default `host`.
- `onAdded` (`(result: { host?: HostSummary; latencyMs?: number; name: string; ok: true; serverVersion?: string }) => void | Promise<void>`): Called after the server was saved.
- `onCancel` (`() => void`): Called when the user cancels.
- `style?` (`CSSProperties`): Inline styles on the form.

Source: [ui/src/machines/AddServerForm.tsx:17](https://github.com/Tahul/zidane/blob/main/ui/src/machines/AddServerForm.tsx#L17)

### `CapabilitiesViewProps`

Interface.

Props for [`CapabilitiesView`](https://zidane.si/docs/reference/ui-machines.md#CapabilitiesView).

```ts
interface CapabilitiesViewProps
```

**Properties**

- `caps` (`HostCapabilities | null`): The host's capabilities; `null` while the first check is out.
- `checking` (`boolean`): A check is out (the Re-check button waits).
- `className?` (`string`): Classes merged on the root.
- `error` (`MachinesError | null`): Why the last check failed.
- `installed?` (`{ name: string; ok: boolean; output: string } | null`): How the last install went: its output shows under the tools when it failed.
- `installing?` (`string | null`): The tool being installed.
- `installRestricted?` (`boolean`): This connection may not install (a chat token): Install shows, Admin only.
- `local?` (`boolean`): This computer: it serves no clients, so what it allows is not listed.
- `onInstall?` (`(name: string) => void`): Installs a missing tool there. Absent: a missing tool offers nothing.
- `onRecheck` (`() => void`): Probes again.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/HostCapabilities.tsx:171](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostCapabilities.tsx#L171)

### `CapabilityTagsProps`

Interface.

Props for [`CapabilityTags`](https://zidane.si/docs/reference/ui-machines.md#CapabilityTags).

```ts
interface CapabilityTagsProps
```

**Properties**

- `caps` (`HostCapabilities | null`): The host's capabilities; nothing shows without them or for an older server's partial answer.

Source: [ui/src/machines/HostCapabilities.tsx:100](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostCapabilities.tsx#L100)

### `ComposerNoticeProps`

Interface.

Props for [`ComposerNotice`](https://zidane.si/docs/reference/ui-machines.md#ComposerNotice).

```ts
interface ComposerNoticeProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `onDismiss` (`() => void`): Called when the user dismisses it.
- `style?` (`CSSProperties`): Inline styles on the root.
- `testId?` (`string`): The root's `data-testid`. Default `composer-notice`.
- `text` (`string`): What happened.

Source: [ui/src/machines/Banners.tsx:74](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L74)

### `CopyTextProps`

Interface.

Props for [`CopyText`](https://zidane.si/docs/reference/ui-machines.md#CopyText).

```ts
interface CopyTextProps
```

**Properties**

- `className?` (`string`): Extra classes on the button.
- `field?` (`boolean`): Shown as a full-width field (a well), not inline text.
- `style?` (`CSSProperties`): Inline styles on the button.
- `text` (`string`): The text shown and copied.

Source: [ui/src/machines/ServerCard.tsx:62](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L62)

### `DaemonMenuProps`

Interface.

Props for [`DaemonMenu`](https://zidane.si/docs/reference/ui-machines.md#DaemonMenu).

```ts
interface DaemonMenuProps
```

**Properties**

- `attention?` (`number`): Sessions waiting for the user, for the orb.
- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before "Restart daemon now". Default: the provider's confirm.
- `daemonMode?` (`boolean`): Daemon mode is on: the toggle row offers to turn it off.
- `onDaemonModeChange?` (`(on: boolean) => void`): Turns daemon mode on or off. Absent: no toggle row.
- `onOpenSession?` (`(sessionId: string) => void`): Opens a session the daemon holds. Absent: its row does nothing.
- `running?` (`number`): Runs on the daemon now, for the orb.
- `sessionTitle?` (`(sessionId: string) => string`): A session's title for its row and the diagnostics. Default: the first 8 characters of its id.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/DaemonMenu.tsx:78](https://github.com/Tahul/zidane/blob/main/ui/src/machines/DaemonMenu.tsx#L78)

### `HostCapabilitiesState`

Interface.

What [`useHostCapabilities`](https://zidane.si/docs/reference/ui-machines.md#useHostCapabilities) returns.

```ts
interface HostCapabilitiesState
```

**Properties**

- `caps` (`HostCapabilities | null`): The last answer; `null` before the first.
- `checking` (`boolean`): A check is out.
- `error` (`MachinesError | null`): Why the last check failed; `null` after a success.
- `install?` (`(name: string) => Promise<void>`): Installs a missing tool there; absent without the host's `installTool`.
- `installed` (`{ name: string; ok: boolean; output: string } | null`): How the last install went.
- `installing` (`string | null`): The tool being installed.
- `recheck` (`() => Promise<void>`): Probes again, bypassing the backend's cache.

Source: [ui/src/machines/HostCapabilities.tsx:21](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostCapabilities.tsx#L21)

### `HostRemovedBannerProps`

Interface.

Props for [`HostRemovedBanner`](https://zidane.si/docs/reference/ui-machines.md#HostRemovedBanner).

```ts
interface HostRemovedBannerProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `notice` (`string`): What was removed (`"<server> was removed"`).
- `onDismiss` (`() => void`): Called when the user dismisses it.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/Banners.tsx:111](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L111)

### `HostSignInProps`

Interface.

Props for [`HostSignIn`](https://zidane.si/docs/reference/ui-machines.md#HostSignIn).

```ts
interface HostSignInProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `hostId` (`string`): The server.
- `hostName` (`string`): Its name, for the lines.
- `label` (`string`): What is being signed in to, for the lines.
- `onClose` (`() => void`): Closes the strip (Cancel or Close).
- `onDone?` (`() => void`): The server stored the tokens.
- `style?` (`CSSProperties`): Inline styles on the root.
- `target` (`HostSignInTarget`): What to sign in to there. Read once, when the sign-in starts.

Source: [ui/src/machines/HostSignIn.tsx:16](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostSignIn.tsx#L16)

### `HostsSectionProps`

Interface.

Props for [`HostsSection`](https://zidane.si/docs/reference/ui-machines.md#HostsSection).

```ts
interface HostsSectionProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before removing a server, installing an update, copying a secret. Default: the provider's confirm.
- `now?` (`number`): "Now" for the relative dates (screenshots). Default: the clock.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/HostsSection.tsx:38](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostsSection.tsx#L38)

### `HostSyncPanelProps`

Interface.

Props for [`HostSyncPanel`](https://zidane.si/docs/reference/ui-machines.md#HostSyncPanel).

```ts
interface HostSyncPanelProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before copying a secret or taking over. Default: the provider's confirm.
- `host` (`HostSummary`): The server.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/HostSyncPanel.tsx:66](https://github.com/Tahul/zidane/blob/main/ui/src/machines/HostSyncPanel.tsx#L66)

### `MachinesProviderProps`

Interface.

Props for [`MachinesProvider`](https://zidane.si/docs/reference/ui-machines.md#MachinesProvider).

```ts
interface MachinesProviderProps
```

**Properties**

- `children` (`ReactNode`): The components that read from `host`.
- `confirm?` (`MachinesConfirm`): Asks before a destructive action, on the app's modal layer. Default: a `ConfirmDialog` on the provider's own overlay.
- `host` (`MachinesHost`): The host the machines components read from and act through.
- `labels?` (`Partial<{ machinesAccess: (scope: string) => 'Admin access' | 'Chat access'; machinesAdd: string; machinesAdding: string; machinesAddServer: string; machinesAdminOnly: string; machinesAgo: (short: string) => string; machinesAutoUpdateTitle: string; machinesCancel: string; machinesCapabilitiesTitle: string; machinesCapsAsMachine: string; machinesCapsAvailable: string; machinesCapsAvailableA11y: string; machinesCapsChecking: string; machinesCapsClone: string; machinesCapsCreateFolders: string; machinesCapsEnvAvailable: string; machinesCapsFeatures: string; machinesCapsFree: (bytes: number) => string; machinesCapsInstall: string; machinesCapsInstallCopy: (command: string) => string; machinesCapsInstallCopyLabel: (tool: string) => string; machinesCapsInstalled: (tool: string) => string; machinesCapsInstallFailed: (tool: string) => string; machinesCapsInstalling: string; machinesCapsInstallLabel: (tool: string) => string; machinesCapsInstallPage: string; machinesCapsInstallPageLabel: (tool: string) => string; machinesCapsMissing: string; machinesCapsMissingA11y: string; machinesCapsMore: (count: number) => string; machinesCapsNotAvailable: string; machinesCapsOs: Record<string, string>; machinesCapsPartial: string; machinesCapsRecheck: string; machinesCapsRemoteInstalls: string; machinesCapsSandbox: string; machinesCapsSync: string; machinesCapsTools: string; machinesChangeUrl: string; machinesChangingUrl: string; machinesCheckError: (error: HostCheckError, message: string) => string; machinesConnectingTo: (name: string) => string; machinesCopiedText: (text: string) => string; machinesCopy: string; machinesCopyText: (text: string) => string; machinesDaemon: string; machinesDaemonActions: string; machinesDaemonConnected: string; machinesDaemonConnecting: string; machinesDaemonCopied: string; machinesDaemonCopy: string; machinesDaemonCopying: string; machinesDaemonDays: (days: number) => string; machinesDaemonHours: (hours: number, minutes: number) => string; machinesDaemonMenu: (health: string) => string; machinesDaemonMinutes: (minutes: number) => string; machinesDaemonModeOff: string; machinesDaemonModeOffHint: string; machinesDaemonModeOn: string; machinesDaemonModeOnHint: string; machinesDaemonNewer: string; machinesDaemonNewerDetail: (versions: string) => string; machinesDaemonOff: string; machinesDaemonOffDetail: string; machinesDaemonOlder: string; machinesDaemonOlderDetail: (versions: string) => string; machinesDaemonOnIt: string; machinesDaemonPid: (pid: number) => string; machinesDaemonProtocol: (version: number) => string; machinesDaemonReconnect: string; machinesDaemonReconnected: string; machinesDaemonReconnectHint: string; machinesDaemonReconnecting: string; machinesDaemonRefused: string; machinesDaemonRelaunch: string; machinesDaemonRelaunchHint: string; machinesDaemonRestart: string; machinesDaemonRestartDeferred: string; machinesDaemonRestarted: string; machinesDaemonRestartHint: string; machinesDaemonRestarting: string; machinesDaemonRestartNow: string; machinesDaemonRestartNowConfirm: string; machinesDaemonRestartNowHint: string; machinesDaemonRetiring: string; machinesDaemonRetiringDetail: string; machinesDaemonRetrying: string; machinesDaemonRunning: string; machinesDaemonStop: string; machinesDaemonStopAll: string; machinesDaemonStopped: (title: string) => string; machinesDaemonStoppedAll: (count: number | void) => string; machinesDaemonStopping: string; machinesDaemonStoppingAll: string; machinesDaemonUnreachable: string; machinesDaemonUp: (uptime: string) => string; machinesDaemonVersions: (daemon: number, window: number) => string; machinesDaemonWaitingForYou: string; machinesDeviceToken: string; machinesDeviceTokenPlaceholder: string; machinesDismiss: string; machinesError: (error: MachinesError) => string; machinesFactConnected: (ago: string) => string; machinesFactScope: (scope: string) => string; machinesFactServerName: (name: string) => string; machinesFactUptime: (uptime: string) => string; machinesFactVersion: (version: string) => string; machinesFolders: string; machinesForget: string; machinesForgetLabel: (machine: string) => string; machinesForgetMessage: (name: string) => string; machinesForgetTitle: (machine: string) => string; machinesGetAdmin: string; machinesGetAdminCopy: string; machinesGetAdminPairNext: string; machinesGetAdminRun: string; machinesGetAdminSave: string; machinesGetAdminSaved: string; machinesGetAdminSaving: string; machinesGetAdminToken: string; machinesGetAdminTokenField: string; machinesGpus: string; machinesHostActions: (name: string) => string; machinesHostName: string; machinesHostRemoved: (notice: string) => string; machinesHostStatuses: { 'auth-refused': string; connected: string; connecting: string; identity: string; local: string; offline: string; reconnecting: string; 'version-mismatch': string }; machinesHostsTitle: string; machinesInviteCommand: string; machinesInviteCopy: string; machinesInviteCreate: string; machinesInviteCreating: string; machinesInviteDone: string; machinesInviteExpires: (time: string) => string; machinesInviteForm: string; machinesInviteHint: string; machinesInviteName: string; machinesInviteNamePlaceholder: string; machinesInviteNameRule: string; machinesInviteNeedsAdmin: string; machinesInviteOpen: string; machinesInviteTitle: (name: string) => string; machinesLinkOff: string; machinesListEmpty: string; machinesListNotPermitted: string; machinesListTitle: (name: string) => string; machinesLocalDescription: string; machinesMachinesTitle: string; machinesNameOptional: string; machinesOfflineAuthRefused: (name: string) => string; machinesOfflineConnecting: (name: string) => string; machinesOfflineIdentity: (name: string) => string; machinesOfflineOther: (name: string, status: string) => string; machinesOfflineRemoved: (name: string) => string; machinesOfflineSince: (when: string) => string; machinesOfflineVersion: (name: string, error?: string) => string; machinesOkLine: (name: string, version?: string, latencyMs?: number) => string; machinesOpenHost: (name: string) => string; machinesRemove: string; machinesRemoveFailed: (name: string, detail: string) => string; machinesRemoveMessage: string; machinesRemoveTitle: (name: string) => string; machinesRemoving: string; machinesRename: string; machinesRenaming: string; machinesRetry: string; machinesSave: string; machinesSavedHostsError: (detail: string) => string; machinesServerUrl: string; machinesServerUrlPlaceholder: string; machinesShareAddFolder: string; machinesShared: (roots: string, name: string) => string; machinesShareFolders: string; machinesShareForm: string; machinesShareHint: (name: string) => string; machinesShareName: (name: string) => string; machinesShareNamePlaceholder: string; machinesShareOpen: string; machinesShareStart: string; machinesShareStop: string; machinesShareTitle: (name: string) => string; machinesShareToken: string; machinesShareTokenPlaceholder: string; machinesSharing: (name: string) => string; machinesStatus: (status: 'online' | 'offline') => 'online' | 'offline'; machinesStopping: string; machinesSyncAccounts: string; machinesSyncAgain: string; machinesSyncApiKey: string; machinesSyncBlocked: (reason: SyncBlockedReason, name: string) => string; machinesSyncCategories: Record<SyncCategory, { description: string; label: string }>; machinesSyncComplete: string; machinesSyncCopyKey: (label: string) => string; machinesSyncEditedHere: (device: string) => string; machinesSyncEditedOn: (name: string) => string; machinesSyncEditedOnTitle: (name: string) => string; machinesSyncEnvConfirm: string; machinesSyncEnvMessage: (name: string) => string; machinesSyncEnvTitle: (name: string) => string; machinesSyncFrom: (device: string) => string; machinesSyncKeyConfirm: string; machinesSyncKeyMessage: (name: string) => string; machinesSyncKeyTitle: (label: string, name: string) => string; machinesSyncMode: string; machinesSyncModeDescription: (device: string | undefined, name: string) => string; machinesSyncModes: Record<SyncMode, string>; machinesSyncMoreLines: (count: number) => string; machinesSyncNoAccounts: string; machinesSyncNotPushed: string; machinesSyncNotSyncable: (list: string) => string; machinesSyncNotSynced: string; machinesSyncOffline: string; machinesSyncOnHost: (name: string) => string; machinesSyncOutcomeDetails: (label: string) => string; machinesSyncPartial: string; machinesSyncPushed: (ago: string) => string; machinesSyncPushing: string; machinesSyncPushNow: string; machinesSyncSetUpOn: (name: string) => string; machinesSyncSignedInThere: string; machinesSyncSignIn: (label: string) => string; machinesSyncSignInThere: string; machinesSyncStartsWithHosts: string; machinesSyncStaysHere: string; machinesSyncStdio: (name: string, list: string) => string; machinesSyncSyncedFrom: (device: string) => string; machinesSyncTakeOver: string; machinesSyncTakeOverMessage: (name: string, other: string) => string; machinesSyncTakeOverTitle: (name: string) => string; machinesSyncTitle: string; machinesSyncTooOld: string; machinesSyncWaiting: string; machinesSyncWaitingList: (categories: string) => string; machinesSyncWarnings: string; machinesSyncWhat: string; machinesTest: string; machinesTesting: string; machinesThisApp: string; machinesThisServer: string; machinesTokensCreate: string; machinesTokensCreated: (name: string) => string; machinesTokensCreatedAt: (ago: string) => string; machinesTokensCreating: string; machinesTokensEmpty: string; machinesTokensExpired: string; machinesTokensExpires: (date: string) => string; machinesTokensList: string; machinesTokensName: string; machinesTokensNamePlaceholder: string; machinesTokensNeverUsed: string; machinesTokensRevoke: string; machinesTokensRevoked: string; machinesTokensRevokeLabel: (name: string) => string; machinesTokensRevokeMessage: string; machinesTokensRevokeTitle: (name: string) => string; machinesTokensScope: string; machinesTokensScopes: Record<ServerTokenScope, string>; machinesTokensUsed: (ago: string) => string; machinesUpdateCheck: string; machinesUpdateChecking: string; machinesUpdateFrom: (version: string) => string; machinesUpdateInstall: string; machinesUpdateInstallMessage: string; machinesUpdateInstallTitle: (latest?: string) => string; machinesUpdateOff: string; machinesUpdateOn: string; machinesUpdateOtherWay: string; machinesUpdateOut: (version: string) => string; machinesUpdateRolledBack: (version: string) => string; machinesUpdateStateChecking: string; machinesUpdateStateDownloading: (latest?: string) => string; machinesUpdateStateError: string; machinesUpdateStateInstalling: (latest?: string) => string; machinesUpdateStateReady: (latest?: string) => string; machinesUpdateStateWaiting: (latest?: string) => string; machinesUpdateStateWaitingOn: (latest: string | undefined, blockers: readonly ('work' | 'terminals')[], since: string) => string; machinesUpdateTurnOff: string; machinesUpdateTurnOn: string; machinesUpdateUnsupported: (name: string) => string; machinesUpdateUpToDate: string; machinesUpdateVersion: (version: string) => string; machinesUrlChanged: (name: string, url: string) => string; machinesUse: string; machinesUseHint: (name: string) => string; machinesUseMachineName: (machine: string) => string; machinesUseNotLent: (name: string) => string; machinesUseStop: string; machinesUseTitle: (name: string) => string; machinesVersion: (version: string) => string; machinesVersionDiffers: (version: string, server: string) => string; machinesWaiting: (machine: string) => string }>`): Overrides for the machines components' strings. Keys you leave out keep the default English label.

Source: [ui/src/machines/MachinesProvider.tsx:38](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L38)

### `MachineWaitingBannerProps`

Interface.

Props for [`MachineWaitingBanner`](https://zidane.si/docs/reference/ui-machines.md#MachineWaitingBanner).

```ts
interface MachineWaitingBannerProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `machine` (`string | null`): The machine the session's run waits for (from its notices, `machineWaiting` in `zidane/chat/pure`), or `null`.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/Banners.tsx:141](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L141)

### `ServerCardProps`

Interface.

Props for [`ServerCard`](https://zidane.si/docs/reference/ui-machines.md#ServerCard).

```ts
interface ServerCardProps
```

**Properties**

- `badge?` (`ReactNode`): Shown after the status dot and chip (a sync outcome badge).
- `className?` (`string`): Extra classes on the card.
- `confirm?` (`MachinesConfirm`): Asks before Remove. Default: the provider's confirm.
- `host` (`HostSummary`): The server, with its live status.
- `now?` (`number`): The current time for the facts, epoch ms. Default: now.
- `onChanged?` (`() => void | Promise<void>`): Called after a test, rename, URL change or removal changed what the host holds.
- `saved?` (`HostSummary`): The saved entry, for the dates the live status lacks (`lastConnectedAt`). Default: `host`.
- `style?` (`CSSProperties`): Inline styles on the card.

Source: [ui/src/machines/ServerCard.tsx:110](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerCard.tsx#L110)

### `ServerMachinesPanelProps`

Interface.

Props for [`ServerMachinesPanel`](https://zidane.si/docs/reference/ui-machines.md#ServerMachinesPanel).

```ts
interface ServerMachinesPanelProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before Forget. Default: the provider's confirm.
- `host` (`HostSummary`): The server.
- `now?` (`number`): The current time for "last seen", epoch ms. Default: now.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/ServerMachinesPanel.tsx:196](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerMachinesPanel.tsx#L196)

### `ServerOfflineBannerProps`

Interface.

Props for [`ServerOfflineBanner`](https://zidane.si/docs/reference/ui-machines.md#ServerOfflineBanner).

```ts
interface ServerOfflineBannerProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `host` (`HostSummary | undefined`): The session's server, or `undefined` when it is no longer saved.
- `name?` (`string`): The name to use when the server is gone. Default: the `machinesThisServer` label.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/Banners.tsx:20](https://github.com/Tahul/zidane/blob/main/ui/src/machines/Banners.tsx#L20)

### `ServerUpdatePanelProps`

Interface.

Props for [`ServerUpdatePanel`](https://zidane.si/docs/reference/ui-machines.md#ServerUpdatePanel).

```ts
interface ServerUpdatePanelProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before Install now. Default: the provider's confirm.
- `host` (`HostSummary`): The server.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/ServerUpdatePanel.tsx:28](https://github.com/Tahul/zidane/blob/main/ui/src/machines/ServerUpdatePanel.tsx#L28)

### `SyncAccountsProps`

Interface.

Props for [`SyncAccounts`](https://zidane.si/docs/reference/ui-machines.md#SyncAccounts).

```ts
interface SyncAccountsProps
```

**Properties**

- `accounts` (`readonly HostSyncAccount[]`): This computer's providers with an API key or a sign-in (`HostSyncState.local.accounts`).
- `className?` (`string`): Extra classes on the root.
- `host` (`HostSummary`): The server.
- `keys` (`readonly string[]`): Providers whose API key is copied.
- `onToggleKey` (`(provider: { key: string; label: string }) => void`): A key's box was ticked or unticked.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/SyncAccounts.tsx:39](https://github.com/Tahul/zidane/blob/main/ui/src/machines/SyncAccounts.tsx#L39)

### `SyncMarkerProps`

Interface.

Props for [`SyncMarker`](https://zidane.si/docs/reference/ui-machines.md#SyncMarker).

```ts
interface SyncMarkerProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `hostId` (`string`): The server whose setting it is.
- `settingKey` (`string`): The setting's key (`approvalMode`).
- `status` (`SyncStatus | null`): The server's sync record (`useServerSyncStatus`).
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/SyncMarker.tsx:33](https://github.com/Tahul/zidane/blob/main/ui/src/machines/SyncMarker.tsx#L33)

### `SyncOutcomeBadgeProps`

Interface.

Props for [`SyncOutcomeBadge`](https://zidane.si/docs/reference/ui-machines.md#SyncOutcomeBadge).

```ts
interface SyncOutcomeBadgeProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `state` (`HostSyncState | null`): The server's sync state (`MachinesHost.sync.state`); `null` shows nothing.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/SyncOutcomeBadge.tsx:18](https://github.com/Tahul/zidane/blob/main/ui/src/machines/SyncOutcomeBadge.tsx#L18)

### `TokensPanelProps`

Interface.

Props for [`TokensPanel`](https://zidane.si/docs/reference/ui-machines.md#TokensPanel).

```ts
interface TokensPanelProps
```

**Properties**

- `className?` (`string`): Extra classes on the root.
- `confirm?` (`MachinesConfirm`): Asks before Revoke. Default: the provider's confirm.
- `host` (`HostSummary`): The server whose tokens to manage.
- `now?` (`number`): The current time for the dates, epoch ms. Default: now.
- `style?` (`CSSProperties`): Inline styles on the root.

Source: [ui/src/machines/TokensPanel.tsx:37](https://github.com/Tahul/zidane/blob/main/ui/src/machines/TokensPanel.tsx#L37)

## Types

### `MachinesConfirm`

Type.

Asks the user to confirm; resolves with the answer.

```ts
type MachinesConfirm = (options: ConfirmOptions) => Promise<boolean>
```

Source: [ui/src/machines/MachinesProvider.tsx:26](https://github.com/Tahul/zidane/blob/main/ui/src/machines/MachinesProvider.tsx#L26)
