Skip to content

zidane-ui/settings/headless

import { … } from 'zidane-ui/settings/headless'ui/src/settings/headless/index.ts

Functions#

accountsFocusIdFunction#

A provider's row on Settings › Accounts, as a deep link's focus names it (SettingsShell's initialFocus).

accountsKeyFocusIdFunction#

A provider's API key field on Settings › Accounts, as a deep link's focus names it: the row opens on its key form.

createPerfMonitorFunction#

Creates a monitor over a host.

createSettingsResourceFunction#

Creates a resource over read.

describedOnFunction#

What a page or row says under its title: on a server's settings (host, its name) its server wording when it has one, else its description.

enabledMcpsAfterAddFunction#

After adding a server: the allowlist with it turned on, or undefined to leave the settings alone. Only a server that wasn't listed before is turned on (an edit keeps its toggle), and only when the list is known. Same rule as the TUI and a server's mcp.upsert.

enabledMcpToolsFunction#

The tools of a server that are on (disabledMcpTools is a deny list).

enabledNamesFunction#

The names that are on.

formatDurationFunction#

0.4 ms, 38 ms, 2.1 s.

formatMemoryFunction#

512 KB, 84 MB, 1.4 GB.

formatPercentFunction#

12.3% under 100, 140% above (several cores).

hasCredentialChoiceFunction#

Whether a provider holds more than one stored credential, so there is a choice of which one is in use (the TUI's expandable auth rows).

hasLaunchedFunction#

Whether a sample holds anything sessions or terminals launched.

isPanelPageFunction#

Whether a page is drawn by one panel (rather than rows).

isSettingsErrorFunction#

Whether a value is a SettingsError.

keyedSettingsResourcesFunction#

Keeps one resource per key (a folder, a skill), so every reader of the same key shares one read.

layoutSearchEntriesFunction#

One entry per row a layout page shows: a catalog row with its keywords and a choice's option labels, a custom row's or a panel's own entries, an app action.

layoutSectionsFunction#

The shell's sections for layout pages, in order.

listLengthFunction#

A list's length; undefined for an answer that isn't a list (a server too old, a failed read).

mcpBadgeFunction#

The badge of a server. A refused key or a failed connection comes from the last test; a sign-in in progress (live) or a sign-in problem wins.

mcpRunningFunction#

How a server runs now, from the host's instances: null when none runs. Retired processes count only while no fresh one runs (they close soon).

mcpSettingsAfterRemoveFunction#

What a removal writes: the server out of enabledMcps, disabledMcpTools and mcpSharing, so a later server of the same name starts from the defaults. Empty when none names it.

mcpShareableFunction#

A server whose process the host may share between sessions: a stdio server the host says runs on it (scope: 'host'). Remote and context servers run per session.

mcpSharedNowFunction#

Whether a server shares one process: the mcpSharing setting, else its config, else yes.

mcpSharingWithFunction#

mcpSharing with one server's choice set.

nestProcessesFunction#

Nests processTree's rows (each parent before its children).

nextOptionFunction#

The option after current in a choice's cycle (the first one after the last, or for an unknown value).

perfSeriesFunction#

One value per sample, for a sparkline.

processGroupsFunction#

The processes as two trees, the app's own and what was launched: a launched tree's roots are what a session or a terminal started.

processTreeFunction#

The processes as a tree, each parent before its children, siblings busiest first.

searchSettingsFunction#

The entries every term of query matches, in index order; none for a blank query.

sectionSearchHitsFunction#

The search index of the shell's sections: each section's search entries, or the section itself (title, description, keywords) when it has none, then extra (entries an app adds, e.g. extension options).

sessionGroupsFunction#

The processes per session, busiest first: each session's own tree.

settingsCountFunction#

How many settings a page holds, as this table describes it (the rail's count): a page of rows, each table row and each part of a custom row, actions aside; a panel, the table settings it draws and the rows its search entries name (those with a key). Pages that list things (skills, servers…) count those from their data instead.

settingsMcpServerOfFunction#

A server of a host's catalog (a zidane-server's catalog.mcps) as MCP servers lists it: its sign-in state, tools and last test from status (an older host sends none: idle, untested). Removable when it is the host user's (mcp.remove edits that file only).

settingsPageCountsFunction#

Each page's count: a list page's length from lists, a page of rows its settings. Zero and unknown counts are left out.

settingsSearchHitsFunction#

layoutSearchEntries for every page, each hit on its page.

shownFunction#

Whether a page, section or row is offered: everything but localOnly parts while editing a server, Spaces included when the app's spaces are the server's.

toggleEnabledFunction#

The allowlist after turning name on or off.

toggleMcpToolFunction#

disabledMcpTools after turning one tool on or off. Names the server no longer lists drop out; an empty list drops the server, an empty map is undefined.

toSettingsErrorFunction#

Wraps whatever a host call threw as a SettingsError.

visiblePagesFunction#

The pages this modal offers: Hosts needs remote hosts on, and while it edits a server the pages (and sections and rows, see shown) composing this computer's files drop out.

Constants#

DEFAULT_SETTINGSConstant#

Default value of every setting.

DEFAULT_SETTINGS_LABELSConstant#

The default English strings of the settings components.

HIDDEN_TABLE_KEYSConstant#

Table choices no page places: TUI-only (targetFps) or drawn by Appearance (theme).

PERF_HISTORYConstant#

Samples kept: 5 minutes at the desktop app's 2 s.

SETTINGS_CHOICE_BY_KEYConstant#

The catalog's choices by key.

SETTINGS_CHOICESConstant#

The catalog's choices, in display order.

SETTINGS_PAGESConstant#

Every page: the rail's entries in order, then the sub-pages (each listed under its parent). Extensions is an entry of its own, after Agent: the extensions' settings entries list under it (useExtensionSettingsSections). One flat literal: the website's evaluator skips spreads.

SETTINGS_TOGGLE_BY_KEYConstant#

The catalog's toggles by key.

SETTINGS_TOGGLESConstant#

The catalog's toggles, in display order.

Interfaces#

LayoutSearchContextInterface#

What a layout page's entries depend on.

LayoutSectionsOptionsInterface#

Options for layoutSections.

PerfChannelInterface#

One message channel's counters.

PerfGpuInterface#

Whole-GPU use: every app's.

PerfHotFunctionInterface#

A function a profile spent time in.

PerfLagInterface#

The host's event-loop delay over the last interval, ms.

PerfMonitorInterface#

A view's window on the host's samples.

PerfMonitorStateInterface#

What a monitor holds.

PerfOsThreadInterface#

One OS thread of a process (no name on macOS).

PerfProcessInterface#

One process of the app, its daemon, or a program either started.

PerfProcessMcpInterface#

The MCP server a process runs.

PerfProcessNodeInterface#

A process with the processes it started, for a tree that opens one level at a time.

PerfProcessRowInterface#

A process with its depth in the tree, for an indented list.

PerfProcessSessionInterface#

The session a process runs for.

PerfProfileInterface#

A recorded profile, saved where path says.

PerfProfileErrorInterface#

Why a profile wasn't recorded: busy (another profile or a debugger holds the target) or failed.

PerfSampleInterface#

One sample.

PerfSessionGroupInterface#

What one session's processes use.

PerfSlowFrameInterface#

Where long frames (over 50 ms) spent their time: one script and function, summed.

PerfThreadInterface#

A thread the app can name.

PerfTotalsInterface#

CPU and memory, summed.

PerfWatchErrorInterface#

Why a host's figures can't be watched: unavailable (the host can't say: a server too old for it), refused (the connection's token may not: performance needs an admin token), failed (anything else, detail says).

SettingsActionInterface#

A host action's row: the host owns the flow (a full modal), the layout places it.

SettingsCatalogEntriesInterface#

One catalog's entries.

SettingsChoiceInterface#

A choice row of the catalog: a setting with a few values, cycled.

SettingsClaudeImportCopyInterface#

What a copy did: by name.

SettingsClaudeImportDetectInterface#

What the host found in ~/.claude.

SettingsClaudeImportHostInterface#

Importing a Claude Code setup on the host.

SettingsClaudeImportSelectionInterface#

What to import.

SettingsClaudeImportSummaryInterface#

What an import did.

SettingsCredentialInterface#

One credential source of a provider. Never a secret.

SettingsDecisionModelInterface#

A model a provider's decisions endpoint serves, with whether the host's credentials can use it.

SettingsEnvironmentsHostInterface#

Where new sessions run: the environment kinds and their settings.

SettingsErrorInterface#

A settings read or write that did not happen, worded by the labels (settingsError).

SettingsExtensionInterface#

An extension the host discovered.

SettingsExtensionActionInterface#

An action an extension declares (registerConfigItem type 'action'); it runs on the host.

SettingsExtensionActionResultInterface#

What a run did: its message, and the config patch it set (already validated by the host).

SettingsExtensionActionStatusInterface#

An action's passive probe.

SettingsExtensionCreateInterface#

An extension to scaffold.

SettingsExtensionCreatedInterface#

A scaffolded extension.

SettingsExtensionInstallInterface#

An extension to install.

SettingsExtensionsHostInterface#

Extensions on the host's disk, for one folder.

SettingsFileInterface#

A file the host reads and writes with a guard on its modification time.

SettingsHostInterface#

The settings host.

SettingsHostCatalogInterface#

A host's catalogs as the host itself reports them (a zidane-server's catalog.*), each entry with the host's enabled state; the enabled lists are its settings (update). Its MCP servers are the mcp group's.

SettingsInstructionsHostInterface#

What a session's agent is loaded with.

SettingsLoadInterface#

What a SettingsResource holds now.

SettingsLogsHostInterface#

The host's log funnel.

SettingsMcpHostInterface#

The MCP servers of a folder (Settings › MCP servers). cwd is the folder ('': the user's servers only). Turning a server or one of its tools on and off is the settings document's (enabledMcps, disabledMcpTools).

SettingsMcpInstanceInterface#

A running process of a stdio server, as the host's pool holds it.

SettingsMcpRunningInterface#

What a server's process badge says: one shared process and how many sessions hold it, or one per session.

SettingsMcpServerInterface#

An MCP server a folder's agents can use. Secret values never come back.

SettingsMcpTestInterface#

How a server answered its last test: ok connected and listed its tools; needs-auth refused with no key of its own (a sign-in fixes it); token-rejected refused the key it sends; error anything else.

SettingsMcpToolInterface#

A tool an MCP server lists.

SettingsModelsHostInterface#

The model rows' host calls. Each one left out hides what needs it.

SettingsModelTestInterface#

How a model test went: one tiny request with the host's credentials.

SettingsPanelPageInterface#

A page one panel component draws; search stands in for its rows, which it loads lazily.

SettingsPathsInterface#

Opening a path of the host in another app.

SettingsPerformanceHostInterface#

The host's performance figures (Settings › Performance, the overlay).

SettingsPluginInterface#

An Agent Plugin the host discovered.

SettingsPluginsHostInterface#

Agent Plugins on the host's disk, for one folder.

SettingsProviderInterface#

A provider and its sign-in state, as the host reports it. Never a secret.

SettingsProviderFieldInterface#

A configuration field a provider asks for instead of an API key (an endpoint, a project id).

SettingsProvidersHostInterface#

The providers a host's agents use (Settings › Accounts). cwd is the folder whose extension providers count ('': built-ins only).

SettingsResourceInterface#

A value the host reads and keeps current: get returns the same object until it changes.

SettingsResourceOptionsInterface#

Options for createSettingsResource.

SettingsSearchEntryInterface#

One search entry inside a section.

SettingsSearchHitInterface#

One search result: an entry and the section it lands on.

SettingsSectionInterface#

The settings section registry: the shell (SettingsShell) renders the sections an app hands it (the kit's own, the per-device preference sections, an app's desktop-only ones), in order. React-free: render returns what the styled shell renders (a ReactNode there), typed unknown here.

A section's body reads its context through hooks, never through render arguments: useSettingsSection() (zidane-ui/settings) gives whether it is the open one, the row a deep link or search landed on, and the header slot its actions portal into.

SettingsSectionsPageInterface#

A page of sections of rows.

SettingsSignInOptionsInterface#

What a browser sign-in is for.

SettingsSkillInstallInterface#

Skills to install from one source.

SettingsSkillsHostInterface#

Skills on the host's disk, for one folder (its project scope plus the user's).

SettingsToggleInterface#

A toggle row of the catalog.

Types#

BooleanSettingKeyType#

The settings whose value is a boolean: what a toggle row may name.

PerfChannelDirectionType#

invoke: a request timed to its answer; send: a message to the host; push: a message from it.

PerfOriginType#

Whose cost a process is. app: the app's own (its processes, its daemon, the servers and helpers they run). launched: what a session's commands, a background task or a terminal started, and everything under it.

PerfProcessKindType#

What a process is to the app.

PerfProfileOutcomeType#

A profile, or why there is none.

PerfProfileTargetType#

What a CPU profile records: the host's main process, or this window.

SettingsActionIdType#

Host actions (SettingsAction.id, wired by the app): a row that opens a flow of its own.

SettingsCatalogInstallKindType#

What can be installed from a spec on a host.

SettingsCatalogKindType#

Which of a host's catalogs.

SettingsCustomRowIdType#

Rows that aren't a table toggle or choice: a model picker, or the agent defaults.

SettingsDocumentType#

The settings document as the host holds it.

SettingsEnabledListKeyType#

The settings keys that hold an enabled allowlist.

SettingsErrorKindType#

Why the settings could not be read or written.

SettingsFileWriteType#

What a guarded write did.

SettingsInstallScopeType#

Where an install goes: the project's folder or the user's.

SettingsLabelsType#

The shape of the settings label dictionary.

SettingsMcpAuthStateType#

Where an MCP server's sign-in is.

SettingsMcpBadgeType#

What a server's badge says: its sign-in state, or how its last test failed. idle: no badge.

SettingsPageType#

A page of the layout.

SettingsPageSectionType#

One titled section of a page of rows.

SettingsPanelIdType#

Pages drawn by one panel component, mounted on first visit and then kept alive (their async state survives).

SettingsPreferredCredentialType#

What setPreferred promotes: a stored credential by key, or the first stored one of a kind.

SettingsRowType#

One row of a section: a catalog key, a custom row the app draws, or an app action.

SettingsSectionNoteIdType#

Status lines an app draws under a section (SettingsRowsPage's notes): the terminals' daemon, how the app updates.

SettingsSectionsPageIdType#

Pages of rows.

SettingsTabIdType#

Every page's id.

SettingsTopIdType#

The rail's entries.