zidane/ ipc/ browser
zidane/ipc/browser — a zidane-server client that runs wherever a
WebSocket does: browsers, workers, Node, Bun. No node:*, no process:
the kit's server adapter (zidane-ui/adapters) and any web app build on it.
Node and Bun clients that keep saved hosts, trust a CA or share a machine
use zidane/ipc/remote, which adds those on top.
import { … } from 'zidane/ipc/browser'src/ipc/browser.ts
Functions#
createExtensionsClientFunction#
Wraps a connected client.
function createExtensionsClient(client: ExtensionsTransport): ExtensionsClientParameters
| Name | Type | Description |
|---|---|---|
| client | ExtensionsTransport | A connected client. |
Returns
ExtensionsClientThe typed extension API client.
createServerClientFunction#
Creates a client for a zidane-server and starts connecting. See the module docs for what it
handles; ServerClient for what it offers.
function createServerClient(options: ServerClientOptions): ServerClientParameters
| Name | Type | Description |
|---|---|---|
| options | ServerClientOptions | The server's |
Returns
ServerClientThe client, connecting.
Example
import { createServerClient } from 'zidane/ipc/browser'
const server = createServerClient({ url: 'wss://zidane.example.com', token })
const hello = await server.ready
if (server.can('sessions.list'))
console.log(await server.call('sessions.list', {}), hello.scope)extensionInstallErrorDataFunction#
The ExtensionInstallErrorData of a call's error data, or
undefined when it carries none.
function extensionInstallErrorData(data: unknown): ExtensionInstallErrorData | undefinedParameters
| Name | Type | Description |
|---|---|---|
| data | unknown | A JSON-RPC error's |
Returns
ExtensionInstallErrorData | undefinedformatJoinStringFunction#
<url>#<CODE>.
function formatJoinString(url: string, code: string): stringParameters
| Name | Type | Description |
|---|---|---|
| url | string | The main server's client URL ( |
| code | string | The join code ( |
Returns
stringmethodScopeFunction#
The scope a method needs, or undefined for a name outside the protocol.
function methodScope(method: string): 'chat' | 'admin' | undefinedParameters
| Name | Type | Description |
|---|---|---|
| method | string | A method name from the wire. |
Returns
'chat' | 'admin' | undefinedpairBrowserFunction#
Trades a pairing code for a device token.
function pairBrowser(
baseUrl: string,
code: string,
name?: string,
options?: PairBrowserOptions,
): Promise<PairedBrowser>Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| baseUrl | string | The server's origin ( | |
| code | string | The code as the user typed it ( | |
| name? | string | The browser's label, used when the operator gave none: the token is named | |
| options? | PairBrowserOptions | {} | A |
Returns
Promise<PairedBrowser>The token, its id, scope and the server's name.
Example
import { createServerClient, pairBrowser, ServerPairError } from 'zidane/ipc/browser'
try {
const { token } = await pairBrowser('https://box.example', '7KQM-3XFD', 'Firefox on the laptop')
const client = createServerClient({ url: 'wss://box.example', token })
}
catch (error) {
if (error instanceof ServerPairError && error.reason === 'expired')
console.log('Run zidane-server pair again')
}parseJoinStringFunction#
{ url, code } from a join string (spaces around it, any case in the
code, the dash optional); null unless the url is ws:// or wss:// with a
host and the code is 8 symbols of the alphabet. The code comes back as
XXXX-XXXX, the url without a trailing slash.
function parseJoinString(s: string): { code: string; url: string } | nullParameters
| Name | Type | Description |
|---|---|---|
| s | string | The join string as pasted. |
Returns
{ code: string; url: string } | nullrunBlockOnHostFunction#
Runs a reply's shell block on a host and resolves with the saved run. Rejects with the host's reason when the block could not run.
function runBlockOnHost(
client: BlockRunClient,
sessionId: string,
request: BlockRunRequest,
options?: BlockRunOnHostOptions,
): Promise<BlockRun>Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| client | BlockRunClient | The host's client. | |
| sessionId | string | The session the reply is in. | |
| request | BlockRunRequest | The block. | |
| options? | BlockRunOnHostOptions | {} | Output listener and stop signal. |
Returns
Promise<BlockRun>scopeAllowsFunction#
Whether a connection granted granted may call a method that needs required.
function scopeAllows(granted: 'chat' | 'admin', required: 'chat' | 'admin'): booleanParameters
| Name | Type | Description |
|---|---|---|
| granted | 'chat' | 'admin' | The connection's scope. |
| required | 'chat' | 'admin' | The method's scope ( |
Returns
booleanClasses#
ServerCallErrorClass#
A call the server answered with an error: its JSON-RPC code and data.
class ServerCallError extends ErrorConstructor
new ServerCallError(message: string, code: number, data?: unknown)Parameters
| Name | Type | Description |
|---|---|---|
| message | string | The server's message. |
| code | number | The JSON-RPC error code. |
| data? | unknown | The error's data. |
Returns
Properties
| Name | Type | Description |
|---|---|---|
| codereadonly | number | The JSON-RPC error code ( |
| data?readonly | unknown | The error's data, when it had some (a |
ServerConnectionErrorClass#
A call that couldn't be answered: the connection dropped, or the client was refused or closed.
class ServerConnectionError extends ErrorConstructor
new ServerConnectionError(message: string, state: ServerClientState)Parameters
| Name | Type | Description |
|---|---|---|
| message | string | What happened. |
| state | ServerClientState | The client's state when the call failed. |
Returns
Properties
| Name | Type | Description |
|---|---|---|
| statereadonly | ServerClientState | The client's state when the call failed: |
ServerPairErrorClass#
A refused or failed pairing, with its ServerPairFailure.
class ServerPairError extends ErrorConstructor
new ServerPairError(reason: ServerPairFailure, status?: number)Parameters
| Name | Type | Description |
|---|---|---|
| reason | ServerPairFailure | Why it failed. |
| status? | number | The HTTP status, when the server answered. |
Returns
Properties
| Name | Type | Description |
|---|---|---|
| reasonreadonly | ServerPairFailure | Why it failed. |
| status?readonly | number | The HTTP status, when the server answered. |
Constants#
CLIENT_SCOPESConstant#
A client token's reach, from the narrowest.
const CLIENT_SCOPES: readonly ['chat', 'admin']IPC_MIN_PROTOCOL_VERSIONConstant#
The oldest protocol version this build still speaks, as a client and as a
zidane-server. A server accepts a client whose range
(minProtocolVersion…protocolVersion) overlaps its own, and the
connection speaks the lower of the two versions, so a web app deployed
against one release keeps working after the server moves one version on.
Raise it only when the code that speaks a version is removed. A local
daemon keeps the exact-version fence: it is respawned on upgrade.
const IPC_MIN_PROTOCOL_VERSION: numberIPC_PROTOCOL_VERSIONConstant#
Changes since v5. Entries marked additive, or "no version bump", did
not raise the version. The current version is IPC_PROTOCOL_VERSION.
eventsignals carry an optionalechoflag marking host-generated SEND/STEER echoes of the user's own message.chat.pushQueuedresult gained the'queued'delivered variant.sessions.setModelnow honorsfallbacks: it persists the canonicalmetadata.modelChainand CLEARS a previously persisted chain when omitted/empty. It also acceptseffort/modelOptionsand resets both when omitted (a pick is atomic — no stale per-model knobs).- additive:
extension.emitnotification +extension:signalfan-out (the permission-gated per-extension cross-window bus,ctx.bus; removed in zidane 10). Older daemons ignore the unknown notification; older clients drop the unknown signal kind — no version bump needed. - additive:
extension.emit/extension:signalcarry an optionalnonce(the emitter's per-process random id) so receivers dedupe on(extensionId, nonce, seq)instead of the collision-prone(extensionId, seq). Older peers omit it and fall back to the seq-only key — no version bump needed. SessionRow.modelFallbacksis now populated from the session's persistedmetadata.modelChain.- Default socket path moved from
<stateDir>/daemon.sockto the dedicated<stateDir>/daemon/daemon.sock(dir chmod'd 0700) so the daemon can harden its socket dir without touching shared state files. - ADDITIVE (no version bump — older daemons answer "method not
found", clients degrade to local compute):
suggest.resolveRPC resolves inline ghost-text autocomplete daemon-side, and thesuggest:changedsignal fans the result out to every OTHER peer on the session so mirroring windows paint the same ghost without recomputing. - ADDITIVE (no version bump — optional field, older daemons simply
omit it and clients fall back to the single
suggestion):suggest.resolveresults andsuggest:changedsignals carry the resolver's full orderedcandidateslist so daemon mode keeps ↑/↓ candidate rotation instead of degrading to one suggestion. - ADDITIVE (no version bump —
optional()swallows "method not found" on an older daemon, which then simply keeps its stale registries as before):runtime.reloadRPC drops the daemon's cached extension registries and retires live agents after a window reloaded its extensions. - ADDITIVE (no version bump):
terminal.registerViewer/terminal.unregisterViewer. The desktop app registers as a client that can show terminals; agents only get terminal tools while one is attached. An older daemon answers "method not found" (and keeps giving every agent the tools, as before); an older desktop app on a newer daemon never registers, so its agents run without terminal tools. - ADDITIVE (no version bump): project / draft terminals
(docs/PROJECT-SCOPE-AUDIT.md):
terminal.projectState,terminal.openInProject,terminal.adopt,terminal.releaseDraft, theterminal:project-changedsignal, andHelloResult.projectTerminals. An older daemon answers "method not found" and omits the flag; clients then offer terminals only in sessions. - ADDITIVE (no version bump):
queue.attachmentsreturns a queued entry's attachments with their bytes, andqueue.updateacceptsattachmentsto replace them. An older daemon answers "method not found" / ignores the field: the entry's attachments stay as queued. - ADDITIVE (no version bump):
chat.steer/chat.followUpresolve to whether the message reached a live run. Older daemons resolvenull, which clients treat as delivered (the pre-existing behavior). - ADDITIVE (no version bump):
sessions.fork,sessions.deleteTurn,sessions.editTurnText,sessions.setFolder,sessions.appendTurns,sessions.rewind. History and folder edits run in the host instead of being written to the store by the client (thensessions.touch+chat.rebuildAgent). Older clients keep the old path, which still works on a shared disk. A newer client only meets an older daemon while it retires (the release fence drains it otherwise), and then gets "method not found". - ADDITIVE (no version bump):
sessions.listMeta,sessions.getMeta,sessions.get,sessions.setExtensionStateserve a client the session data it used to read and write in its own store, so a window on another machine sees the host's sessions.sessions.createacceptseffort,modelOptionsandpinnedSkills;todos.setacceptspersistIdle. An older host answers "method not found" / ignores the fields: a window falls back to the store it shares with a local daemon, and refuses a remote host. - ADDITIVE (no version bump):
daemon.inforeportsactiveWork(a run, compaction,/command or background task in flight). An older host omits it;zidane server wait-idlethen says it can't tell. - ADDITIVE (no version bump):
sessions.loadEventspaging acceptsbeforeTurnId(the page ends right before that turn, winning overbefore; an unknown turn is invalid params) and the page echoes it. An older host ignores the param and omits the echo, which is how a client tells. - ADDITIVE (no version bump):
sessions.cacheImpactandsessions.cacheReport. An older host answers "method not found": pickers show no cache estimate and session details no Cache section. - ADDITIVE (no version bump):
sessions.moveEnvironment. An older host answers "method not found", shown as the move's error. ItsremoveOldWorktreeparam andoldWorktreeresult came later: an older host ignores the param and answers with no result. - ADDITIVE (no version bump): a folder's git checkout and files
(
git.*,files.*, the caller-onlygit:clone:progresssignal),sessions.exportandhud.get. Clients find them in the hello'smethods; an older host lacks them and those controls stay hidden.hud.getand thehud:state/hud:notifysignals are gone since zidane 10: extensions show status throughSlotitems (extensions.ui.list,extensions:ui); a client that still asks forhud.getgets "method not found". - ADDITIVE (no version bump):
sessions.titleStatus,artifacts.refresh,usage.summary,git.watch/git.unwatch(the watcher-onlygit:refssignal),files.mediaTicket(media atGET /zidane/media), project-scopeextensions.create, andauth.status'scustomFields/configuredFields. The methods are in the hello'smethods; an older host omits the fields. - ADDITIVE (no version bump):
daemon.ownedProcesses. An older host answers "method not found"; the desktop app's performance monitor then counts none of its processes as the app's own. - ADDITIVE (no version bump):
daemon.sessionProcesses. An older host answers "method not found"; the performance monitor then shows none of its processes under a session. - ADDITIVE (no version bump):
sessions.setPolicy(andsessions.create'spolicy),integrations.register/update/list,mcp.instancesandmcp.restart. An older host answers "method not found" and ignores the field. - ADDITIVE (no version bump):
interactions.rehydrateSessions,tokens.revokeSelf,fs.mkdir,fs.searchDirs, the hello'scloneandcreateFolders(git.cloneandgit.cloneCanceltake achattoken),whenIdleonsessions.appendTurns,origin,literalandclientMessageIdon the send methods, thedelivery:changedandintegrations:changedsignals, andtakenOveronrun:end. An older host answers "method not found" or ignores the fields; an older client drops the unknown signals and reads a taken-over run as failed. - 14: the
orchestration.*verbs act as the CONNECTION (its token, or the local window) instead of taking amainId;createWorkertakestools/subscribeand an optionalprompt; neworchestration.wait,orchestration.events,orchestration.pending,orchestration.answer(chat) andorchestration.approve(approve);answeredByoninteraction:resolved/approval:resolvedand on interaction responses. A v13 peer still speaks:orchestration.mainis unchanged and a straymainIdis ignored. - 15: plans replace todos.
plans.get/plans.edit/plans.controland theplans:snapshotsignal replacetodos.get/todos.setandtodos:snapshot. Not additive: the minimum version is 15 too, so an older peer is refused at hello instead of silently showing no plans. - 16: one way to send a message while a run works.
chat.steerandchat.followUpare removed:queue.addwithdeliverytakes their place, with attachments and skills.deliverygainsauto(the default, which followsSettings.messageDelivery) andqueue.Settings.queueMessagesbecomesSettings.messageDelivery. Not additive: the minimum version is 16 too.
const IPC_PROTOCOL_VERSION = 16IpcErrorCodeConstant#
JSON-RPC error codes specific to the zidane daemon. Lives here (not in
daemon/server.ts) so clients can import the codes without pulling the
server's module graph.
const IpcErrorCode: { readonly Forbidden: -32015; readonly HandlerFailed: -32014; readonly NotHandshaken: -32011; readonly RateLimited: -32012; readonly ResponseTooLarge: -32013; readonly VersionMismatch: -32010 }METHOD_SCOPESConstant#
The lowest client scope that may call each method.
const METHOD_SCOPES: { readonly [M in IpcMethodName]: ClientScope }SERVER_AUTH_CHECK_PATHConstant#
The path of a zidane-server's auth check, relative to its WebSocket URL's origin (same as SERVER_AUTH_PATH).
const SERVER_AUTH_CHECK_PATH = SERVER_AUTH_PATHSERVER_AUTH_PATHConstant#
Where a browser client asks why it can't connect, relative to the server's origin: a token's scope, or the refusal an upgrade would get.
const SERVER_AUTH_PATH = '/zidane/auth'SERVER_EXTENSIONS_UI_PATHConstant#
Where the ui bundles are listed (GET ?cwd=) and served (GET /<hash>.js).
const SERVER_EXTENSIONS_UI_PATH = '/zidane/extensions/ui'SERVER_EXTENSIONS_WEBVIEW_PATHConstant#
Where webview URLs are minted (POST ?cwd=&id=) and their files served (/<ticket>/…).
const SERVER_EXTENSIONS_WEBVIEW_PATH = '/zidane/extensions/webview'SERVER_MEDIA_PATHConstant#
Where a zidane-server serves workspace media (GET, files.mediaTicket), relative to its origin.
const SERVER_MEDIA_PATH = '/zidane/media'SERVER_OAUTH_CALLBACK_PATHConstant#
Where a zidane-server takes a browser client's MCP sign-in back (auth.oauth.begin), relative to its origin.
const SERVER_OAUTH_CALLBACK_PATH = '/zidane/oauth/callback'SERVER_PAIR_PATHConstant#
Where a browser trades a pairing code for a device token (POST, JSON), relative to the server's origin.
const SERVER_PAIR_PATH = '/zidane/pair'Interfaces#
BlockRunClientInterface#
What runBlockOnHost needs of a client: a call (a server client's call, an IPC client's request) and its signals.
interface BlockRunClientProperties
| Name | Type | Description |
|---|---|---|
| call | <M extends 'sessions.runBlock' | 'sessions.runBlockCancel'>(method: M, params: IpcParams<M>) => Promise<IpcResult<M>> | Calls a method on the host. |
| onSignal | (listener: (signal: HostSignal) => void) => () => void | Hears the host's signals; returns the unsubscribe. |
BlockRunOnHostOptionsInterface#
Options for runBlockOnHost.
interface BlockRunOnHostOptionsProperties
| Name | Type | Description |
|---|---|---|
| onOutput? | (stream: 'stdout' | 'stderr', text: string) => void | Output as it arrives. |
| signal? | AbortSignal | Stops the run on the host. |
ExtensionInstallErrorDataInterface#
The data of a HandlerFailed error from an extension install
(catalog.install, extensions.changeOrigin) that found extensions in
the source but not the one it needed: the installer's error code
(name-mismatch, multiple-candidates, no-extension) and the names it
found, for a client to list. Additive: older hosts send the names in the
message only.
interface ExtensionInstallErrorDataProperties
| Name | Type | Description |
|---|---|---|
| candidates | string[] | The extension names the source holds. |
| installError | string | The installer's error code: |
ExtensionsClientInterface#
The typed extension API client.
interface ExtensionsClientProperties
| Name | Type | Description |
|---|---|---|
| announce | (info: UiClientAnnounce) => Promise<void> | Tells the host what this window shows (send on focus and session change). |
| catalogProvenance | (cwd: string, kind: CatalogKind) => Promise<CatalogItemProvenance[]> | Where each item of a catalog ( |
| commands | { keymap: (cwd: string, sessionId?: string) => Promise<WireKeymap>; list: (cwd: string, sessionId?: string) => Promise<WireExtensionCommands>; onChange: (listener: (cwd: string, keymap?: { mode?: string }) => void) => () => void; popMode: (handle: string) => Promise<boolean>; pushMode: (cwd: string, mode: string, opts?: { priority?: number; sessionId?: string }) => Promise<string>; run: (cwd: string, id: string, opts?: { args?: string; sessionId?: string }) => Promise<boolean> } | The commands and keymap modes extensions register. |
| entries | { list: (cwd: string) => Promise<WireExtensionEntry[]>; onChange: (listener: (cwd: string) => void) => () => void } | The extensions of a folder (status, |
| integrations | { connectKey: (cwd: string, integrationId: string, key: string, methodId?: string) => Promise<WireIntegration>; disconnect: (cwd: string, integrationId: string, account?: string) => Promise<void>; flowInput: (flowId: string, inputId: string, value: string | undefined) => Promise<boolean>; list: (cwd: string) => Promise<WireIntegration[]>; onChange: (listener: (cwd: string) => void) => () => void; setDefault: (cwd: string, integrationId: string, account: string) => Promise<void>; start: (cwd: string, integrationId: string, methodId: string, onStep: (step: IntegrationFlowStep, flowId: string) => void) => Promise<WireIntegration> } | The integrations extensions declare, and their connections. |
| links | { open: (cwd: string, link: Omit<LinkOpenParams, 'cwd'>) => Promise<{ handled: boolean }> } | The extensions' link handlers. |
| onRpcEvent | (listener: (event: RpcEventEnvelope) => void) => () => void | Hears each event an extension's RPC contract emits. |
| rpc | <T = unknown>(contract: string, method: string, input?: unknown, opts?: { cwd?: string; signal?: AbortSignal }) => Promise<NoInfer<T>> | Calls an RPC method. Rejects with |
| serve | (server: ExtensionsUiServer) => () => void | Answers the dialogs and UI requests the host routes to this window. |
| settings | { get: (cwd: string, sessionId?: string) => Promise<WireExtensionSettings>; onChange: (listener: (cwd: string) => void) => () => void; set: (params: SettingsSetParams) => Promise<void> } | The extensions' settings, with where each value comes from. |
| sources | { browse: (source: string) => Promise<ExtensionSourceListing>; changeOrigin: (params: { name: string; scope: 'user' | 'project'; source: string }) => Promise<{ message: string; name: string; origin: ExtensionInstallOrigin; progress: string[] }> } | Sources of extensions: what one holds, and moving an installed extension to another. |
| storage | { load: (cwd: string, loc: WireStorageLocation) => Promise<StorageSnapshot & { projectRoot?: string }>; onChange: (listener: (change: { area: StorageArea; extensionId: string; key: string; kind: 'extensions:storage'; projectRoot?: string; scope: StorageScope; sessionId?: string; value?: Json; version?: number }) => void) => () => void; set: (cwd: string, loc: WireStorageLocation, area: StorageArea, key: string, value: Json | undefined) => Promise<WireStorageSetResult> } | The extensions' synced storage. |
| ui | { invoke: (cwd: string, request: UiInvokeRequest) => Promise<unknown>; list: (cwd: string) => Promise<WireUiList>; onChange: (listener: (cwd: string, change: UiChange | { type: 'reset' }) => void) => () => void; onPanelChanged: (listener: (change: { cwd: string; extensionId: string; panelId: string; sessionId?: string }) => void) => () => void } | The UI items of extensions and the callbacks they register. |
ExtensionsTransportInterface#
What the client needs of a connection: an IpcClient (zidane/ipc)
or a browser ServerClient (zidane/ipc/browser).
interface ExtensionsTransportProperties
| Name | Type | Description |
|---|---|---|
| onSignal | (listener: (signal: HostSignal) => void) => () => void | Hears every signal the host sends. |
| request | <M extends keyof IpcMethods>(method: M, params: IpcParams<M>) => Promise<IpcResult<M>> | Sends an IPC request and resolves with its result. |
ExtensionsUiServerInterface#
What a window does with what the host routes to it.
interface ExtensionsUiServerProperties
| Name | Type | Description |
|---|---|---|
| client | (request: UiClientRequest) => unknown | Runs a UI request (panel, navigate, composer); resolves with its result ( |
| dialog | (request: DialogRequest, ctx: { dialogId: string; extensionId: string; sessionId?: string; signal: AbortSignal; validate: (key: string, value: unknown) => Promise<string | null> }) => Promise<unknown> | Shows a dialog; resolves with the raw answer ( |
HelloResultInterface#
Result of the hello handshake and of daemon.info.
interface HelloResultProperties
| Name | Type | Description |
|---|---|---|
| activeWork? | boolean |
|
| adminCommands? | { pair: string; token: string } | How to get an admin token on this zidane-server: the commands to run on
its machine, with its own binary, user and data dir ( |
| appVersion | string | zidane version of the host. |
| buildId? | string | Build fingerprint of the host code. |
| clone? | boolean | Clients may clone repositories into its workspace roots ( |
| codeVersion? | string | Version of the zidane code the host runs. |
| createFolders? | boolean | Clients may create folders in its workspace roots ( |
| homeDir? | string | The host process's home folder ( |
| hostId? | string | Host identity (additive). |
| hostKind? | HostKind | What kind of host this is. |
| hostName? | string | Display name of the host. |
| machineServe? | boolean | This server lends itself as a machine to the hosts of its clients
( |
| methods? | keyof IpcMethods[] | The methods this connection may call on this host: the ones it handles, within |
| minProtocolVersion? | number | The oldest version the host still speaks ( |
| negotiatedProtocolVersion? | number | The version this connection speaks: the lower of the client's and the host's. Additive:
absent, the connection speaks |
| pid | number | Process id of the host. |
| projectTerminals? | true | This host runs terminals without a session ( |
| protocolVersion | number | Protocol version the host speaks. |
| remoteInstalls? | boolean | This server takes installs and removals from its clients ( |
| retiring? | boolean | The daemon is older than a client that attached while it had active work: it accepted the handshake instead of draining (which would abort those runs) and exits once idle. Clients attach normally; their reconnect path lands on a fresh daemon after the exit. |
| scope? | 'chat' | 'admin' | The client scope this connection's token grants ( |
| signalEpoch? | string | Names this host process's signal numbering ( |
| startedAt | number | Start time of the host process, epoch ms. |
| sync? | boolean | This server takes settings sync from a client's computer ( |
| syncCategories? | SyncCategory[] | The sync categories it takes. Absent with |
IpcMethodsInterface#
Typed method map for the daemon transport. Keys are JSON-RPC method names; each entry pins params/result so both the daemon dispatch table and the client proxy are checked against the same contract.
Scope: the chat core every client needs. Host-UI-specific surfaces (folder pickers, themes, keybindings) intentionally stay client-local.
interface IpcMethods extends HitlIpcMethodsProperties
| Name | Type | Description |
|---|---|---|
| agents.list | { params: { cwd: string }; result: HostAgentProfile[] } | The agent profiles |
approvals.denyAllfrom HitlIpcMethods | { params: { sessionId?: string }; result: void } | Denies every pending approval, or only those of |
approvals.listPendingfrom HitlIpcMethods | { params: Record<string, never>; result: WireApprovalRequest[] } | Lists the approval requests waiting for an answer. |
approvals.resolvefrom HitlIpcMethods | { params: { decision: ApprovalDecision; requestId: string }; result: void } | Answers a pending approval request with a decision. |
| artifacts.badges | { params: { sessionIds: string[] }; result: Record<string, SessionBadgeEntry[]> } | The badges under sessions' titles (commits, pull requests, extension
kinds with a |
| artifacts.delete | { params: { artifactId: string; sessionId: string }; result: boolean } | Remove one artifact. |
| artifacts.list | { params: { kind?: string; limit?: number; projectRoot?: string | null; since?: number; uri?: string }; result: SessionArtifact[] } | Artifacts across sessions, filtered by project root ( |
| artifacts.refresh | { params: { artifactId: string; force?: boolean; sessionId: string }; result: SessionArtifact | null } | Re-resolves one stored artifact (is the pull request merged?): its kind's
|
| artifacts.upsert | { params: { artifact: SessionArtifact }; result: SessionArtifact | null } | Upsert an artifact — the lazy |
| auth.configure | { params: { customFields?: Record<string, string>; provider: string; value?: string }; result: HostProviderAuth } | Stores a provider's API key and its custom fields (a local server's URL,
a cloud's region; |
| auth.oauth.begin | { params: { account?: string; cwd?: string; kind?: string; mcpServer?: string; provider?: string; redirectUri?: string }; result: HostOAuthBegin } | OAuth sign-in with the browser on the CLIENT and the tokens on the host:
the host starts a provider's login ( A client that can't listen (a browser) signs in to an MCP server through
a zidane-server's own redirect:
|
| auth.oauth.cancel | { params: { flowId: string }; result: { cancelled: boolean } } | Abandon a flow of this connection. |
| auth.oauth.complete | { params: { code?: string; flowId: string; input?: string; state?: string }; result: HostOAuthComplete } | Deliver the code ( |
| auth.oauth.respond | { params: { flowId: string; stepId: string; value?: string }; result: HostOAuthBegin } | Answer the step a flow is waiting on ( |
| auth.remove | { params: { account?: string; provider: string }; result: { provider: HostProviderAuth; removed: boolean } } | Remove one stored credential ( |
| auth.rename | { params: { account: string; label: string; provider: string }; result: HostProviderAuth } | Rename a stored OAuth account ( |
| auth.setApiKey | { params: { key: string; provider: string }; result: HostProviderAuth } | Store an API key for one of the host's providers as its active
credential, apply it to the host's environment, and rebuild agents
(idle now, busy ones at run end). Returns the provider's new status.
OAuth sign-in goes through |
| auth.setPreferred | { params: { provider: string; target: 'oauth' | 'apikey' | { key: string } }; result: HostProviderAuth } | Make one of a provider's stored credentials the active one ( |
| auth.status | { params: Record<string, never>; result: { providers: HostProviderAuth[] } } | The host's provider credentials, as the host's agents use them (its
data dir's |
| badges.actions | { params: { cwd: string; target: BadgeTarget }; result: BadgeMenuItem[] } | The extensions' items ( |
| badges.run | { params: { cwd: string; id: string; source: string; target: BadgeTarget }; result: BadgeActionEffect } | Runs an extension's badge item; the effect (copy, open, a notice) is the client's to apply. Additive. |
| browser.registerHost | { params: { hostId: string }; result: { ok: boolean } } | Dev browser: a window offers to host the pages the agent's |
| browser.respond | { params: { requestId: string; response: BrowserResponse }; result: { ok: boolean } } | Answers a |
| browser.unregisterHost | { params: { hostId: string }; result: { ok: boolean } } | Withdraws a window as dev browser host. |
| catalog.extensions | { params: { cwd?: string; kind?: string }; result: { extensions: HostCatalogExtension[] } } | Extensions installed for |
| catalog.install | { params: { all?: boolean; extension?: string; kind: HostInstallKind; overwrite?: boolean; scope?: 'user'; skills?: string[]; spec: string }; result: { installed: string[]; message: string; progress: string[] } } | Install a skill or an extension on the host, in its user's scope only
( |
| catalog.mcps | { params: { cwd?: string; kind?: string }; result: { errors: HostCatalogError[]; servers: HostCatalogMcp[] } } | MCP servers: |
| catalog.plugins | { params: { cwd?: string; kind?: string }; result: { plugins: HostCatalogPlugin[] } } | Plugins installed for |
| catalog.remove | { params: { kind: HostInstallKind; name: string }; result: { message: string; removed: string } } | Remove a user-scope skill or extension of the host by name (its directory). As |
| catalog.skills | { params: { cwd?: string; kind?: string }; result: { skills: HostCatalogSkill[] } } | What the host discovered for the settings tabs, each entry with whether
the host's settings enable it (an unset allowlist enables everything).
|
| catalog.update | { params: { kind: HostInstallKind; name: string }; result: { message: string; updated: string; upToDate: boolean } } | Update a user-scope extension installed from a source. As |
| chat.cancelWork | { params: { id: string; reason?: string; sessionId: string }; result: boolean } | Cancels one tracked work item by |
| chat.deliveryState | { params: { clientMessageId?: string; requestId?: string; sessionId: string }; result: { runId?: string; settled: boolean; state: 'unknown' | DeliveryState } } | What became of a send, by its |
| chat.interrupt | { params: { sessionId: string }; result: void } | Aborts the session's live run. Does nothing when no run is live. |
| chat.isRunning | { params: { sessionId: string }; result: boolean } | Resolves |
| chat.listWork | { params: { children?: boolean; sessionId: string }; result: RunningWorkItem[] } | Lists the tool calls and background tasks the session's live run tracks
and can cancel. Empty when no run is live. |
| chat.pushQueued | { params: { activatedSkills?: string[]; clientMessageId?: string; keepDraft?: boolean; literal?: boolean; message: string; metadata?: Record<string, JsonValue>; origin?: TextOrigin; sessionId: string } & SendRequestId; result: { consumed?: 'steer' | 'followUp' | 'handled'; delivered: 'command' | 'send' | 'steer' | 'queued' } } | Delivers a queued message. Steers a live run, otherwise starts a run or runs it as a command. |
| chat.rebuildAgent | { params: { sessionId: string }; result: void } | Retire the session's live agent so the next run rebuilds against fresh config/credentials (MCP login, extension reload). Run-end deferred when a run is in flight; HITL/queue state survives. |
| chat.send | { params: Omit<SendOptions, 'wake'> & SendRequestId; result: { consumed?: 'steer' | 'followUp' | 'handled'; runId: string } } |
|
| claudeImport.detect | { params: { cwd?: string }; result: ClaudeImportDetection } | What |
| claudeImport.preview | { params: { cwd?: string }; result: OnboardingImportPreview } | What each piece of the Claude Code import would copy and skip. Additive. |
| claudeImport.run | { params: { cwd?: string } & ClaudeImportSelection; result: ClaudeImportSummary } | Imports a Claude Code setup into the host's own places: conversations
into its session store, MCP servers, skills, commands and subagents into
the host user's files. Idempotent (what is there is skipped, never
overwritten). It copies commands the host will run: a zidane-server's
|
| commands.completeArgs | { params: { argsPrefix: string; cwd: string; kind?: string; name: string }; result: CommandArgSuggestionSummary[] } | Argument suggestions for |
| commands.list | { params: { cwd: string; kind?: string }; result: CommandSummary[] } | Extension-contributed |
| completions.providers | { params: { cwd: string }; result: ExtensionCompletionProviderSummary[] } | The extension completion providers ( |
| completions.submit | { params: { cursor: number; cwd: string; text: string }; result: void } | Runs the providers' submit hooks ( |
| completions.suggest | { params: { cursor: number; cwd: string; providerId: string; query: string; text: string }; result: ExtensionCompletionItemSummary[] } | One provider's items for |
| daemon.info | { params: Record<string, never>; result: HelloResult } | Daemon identity and version: |
| daemon.ownedProcesses | { params: Record<string, never>; result: OwnedProcess[] } | The processes the daemon started for its own work (MCP servers, bounded tool runs such as git and linters), which lead their own process group like a session's command does. The desktop app's performance monitor counts them as the app's. Additive: an older daemon answers "method not found", read as none. |
| daemon.sessionProcesses | { params: Record<string, never>; result: SessionProcess[] } | The processes the daemon started for a session (its shell tool's commands and background tasks, its terminals, its own MCP servers), by session id. The desktop app's performance monitor shows what each session uses. Additive: an older daemon answers "method not found", read as none. |
| daemon.shutdown | { params: { whenIdle?: boolean }; result: void | { deferred?: boolean } } | Graceful drain: deny pending approvals, abort live runs, close the socket. Used by clients that detect a protocol-version mismatch and need the stale daemon gone before respawning.
|
| decisions.test | { params: { cwd?: string; kind?: string; model?: string }; result: HostDecisionTestResult } | Send one tiny decision with this host's credentials, to check a decision
model works. |
| drafts.get | { params: { sessionId: string }; result: { attachments?: PromptAttachment[]; search?: { active: boolean; query: string }; shell?: boolean; text: string } } | Current shared draft for a session — backfill on window attach. |
| drafts.set | { params: { sessionId: string; shell?: boolean; text: string }; result: void } | Replace the session's shared draft. Fans out
|
| drafts.setAttachments | { params: { attachments: PromptAttachment[]; sessionId: string }; result: void } | Replace the shared draft's composing attachments (notification). |
| environments.list | { params: { cwd?: string; kind?: string }; result: EnvironmentDescriptor[] } | Every environment kind the host can create, described for a new session
in |
| environments.update | { params: EnvironmentSettingsChange; result: void } | Apply one Environments-settings edit (enable, default, options,
secrets), validated against the kind's schema. Settings changes fan out
as |
| environments.verify | { params: { kind: string }; result: EnvironmentVerifyResult } | "Test connection" for a kind with its current options. |
| extensions.actions | { params: { cwd: string }; result: ExtensionActionSummary[] } | The action rows ( |
| extensions.actionStatuses | { params: { cwd: string }; result: Record<string, ExtensionConfigActionStatus> } | The actions' passive |
| extensions.browse | { params: { source: string }; result: ExtensionSourceListing } | The extensions of a source ( |
| extensions.catalogs.provenance | { params: { cwd: string; kind: CatalogKind }; result: CatalogItemProvenance[] } | Which catalog items of |
| extensions.changeOrigin | { params: { name: string; scope: 'user' | 'project'; source: string }; result: { message: string; name: string; origin: ExtensionInstallOrigin; progress: string[] } } | Install an installed extension again from another source (GitHub or
npm): the source must hold an extension of the same |
| extensions.command.run | { params: CommandRunParams; result: boolean } | Runs a command by its published id (an extension command or a built-in). |
| extensions.commands | { params: { cwd: string; sessionId?: string }; result: WireExtensionCommands } | The extension commands of |
| extensions.configSchema | { params: { cwd: string }; result: WireExtensionConfigSchema } | The options the enabled extensions declare for |
| extensions.create | { params: CreateExtensionInput; result: CreateExtensionResult } | Scaffolds a new extension and reloads the registries: in the host user's
|
| extensions.entries | { params: { cwd: string }; result: WireExtensionEntry[] } | The extensions of |
| extensions.integrations.connectKey | { params: { cwd: string; integrationId: string; key: string; methodId?: string }; result: WireIntegration } | Connects with an API key: verified by the extension, then kept in the credentials file. Additive. |
| extensions.integrations.disconnect | { params: { account?: string; cwd: string; integrationId: string }; result: void } | Removes the connection of |
| extensions.integrations.flowInput | { params: { flowId: string; inputId: string; value?: string }; result: boolean } | Answers a flow step that asked for input ( |
| extensions.integrations.list | { params: { cwd: string }; result: WireIntegration[] } | The extension integrations of |
| extensions.integrations.setDefault | { params: { account: string; cwd: string; integrationId: string }; result: void } | Makes the connection of |
| extensions.integrations.start | { params: { cwd: string; flowId?: string; integrationId: string; methodId: string }; result: WireIntegration } | Runs an OAuth or command method. Its steps (open this URL, enter this
code, paste the redirect) come to this connection as
|
| extensions.keymap.list | { params: { cwd: string; sessionId?: string }; result: WireKeymap } | Every command of |
| extensions.keymap.pop | { params: { handle: string }; result: boolean } | Pops a mode this connection pushed. Additive. |
| extensions.keymap.push | { params: { cwd: string; mode: string; priority?: number; sessionId?: string }; result: string } | Activates a keymap mode on the host for |
| extensions.links.open | { params: LinkOpenParams; result: { handled: boolean } } | Offers a link the user opened to |
| extensions.runAction | { params: { cwd: string; extension: string; key: string }; result: ExtensionActionRunResult } | Runs an action on the host. The config patch it returns comes back
sanitized, not written: the client saves it ( |
| extensions.settings | { params: { cwd: string; sessionId?: string }; result: WireExtensionSettings } | The extensions' settings of |
| extensions.settings.set | { params: SettingsSetParams; result: void } | Writes one extension setting at a scope: |
| extensions.storage.load | { params: { cwd: string } & WireStorageLocation; result: StorageSnapshot & { projectRoot?: string } } | Everything stored at a location of |
| extensions.storage.set | { params: { area: StorageArea; cwd: string; key: string; value?: Json } & WireStorageLocation; result: WireStorageSetResult } | Writes (or, |
| extensions.ui.invoke | { params: { cwd: string } & UiInvokeRequest; result: unknown } | Runs one callback of a UI item by its id (a panel's |
| extensions.ui.list | { params: { cwd: string }; result: WireUiList } | Every UI item of |
| files.diagnostics | { params: { cwd: string; disabled?: string[]; paths: string[]; timeoutMs?: number }; result: DiagnosticsResult } | Runs the project's own linters and typecheckers on |
| files.diagnosticsInvalidate | { params: { cwd: string }; result: void } | Drops the cached diagnostics of |
| files.diagnosticsTools | { params: { cwd: string }; result: DiagnosticsToolInfo[] } | The diagnostics tools and whether each runs for |
| files.list | { params: { cwd: string }; result: FileEntry[] } | The files under |
| files.location | { params: { cwd: string }; result: FolderLocation } | Where |
| files.mediaTicket | { params: { ticket: string }; result: void } | Lets this connection's media play from |
| files.resolvePaths | { params: { cwd: string; texts: string[] }; result: ResolvedPath[] } | What names in prose point at (files, folders, else branches), in order: what a transcript's path chips open. |
| files.search | { params: { caseSensitive?: boolean; cwd: string; query: string; searchId?: string }; result: ContentSearchResult } | Lines containing |
| fs.listDirs | { params: { path?: string }; result: FsDirListing } | The folders in |
| fs.mkdir | { params: { name: string; parent: string }; result: FsDirEntry } | Creates folder |
| fs.roots | { params: Record<string, never>; result: FsRoots } | Where this host lets a session's folder be: a server's workspace roots
( |
| fs.searchDirs | { params: { path?: string; query: string }; result: FsDirSearch } | The folders whose name holds |
| git.branches | { params: { cwd: string }; result: GitBranchRow[] } | The local branches, most recently committed first, each against the default branch. |
| git.branchPullRequest | { params: { branch: string; cwd: string; fresh?: boolean }; result: GitPr | null } |
|
| git.checkout | { params: { cwd: string; sessionId?: string; target: GitSwitchTarget }; result: GitCheckoutResult } | Switches the checkout to a branch or a pull request ( |
| git.clone | { params: { input: string; parent: string }; result: RepoCloneResult } | Clones |
| git.cloneCancel | { params: Record<string, never>; result: void } | Cancels this connection's clone: the half-cloned folder is removed and |
| git.commit | { params: { cwd: string; sha: string }; result: GitCommitInfo | null } | One commit's facts, for a sha chip; |
| git.createBranch | { params: { cwd: string; name: string; sessionId?: string }; result: GitCheckoutResult } | Starts branch |
| git.diff | { params: { context?: number | null; cwd: string; path?: string }; result: string } | The working tree against HEAD as a unified patch (untracked files as new files), the whole checkout or one
|
| git.fileStatus | { params: { cwd: string }; result: GitStatusEntry[] } | Each changed path's status against HEAD, untracked files included. |
| git.pullRequests | { params: { cwd: string; fresh?: boolean; search?: string }; result: GitPrListResult } | Open pull requests ( |
| git.status | { params: { cwd: string }; result: GitInfo | null } | Where the checkout stands (branch, upstream, ahead / behind, uncommitted changes); |
| git.sync | { params: { cwd: string; sessionId?: string }; result: GitSyncResult } | Pulls (merging) then pushes the current branch, or publishes it without an upstream; refused while an agent runs in it. |
| git.unwatch | { params: { cwd: string }; result: void } | Releases one |
| git.watch | { params: { cwd: string }; result: boolean } | Follows |
| history.searchAll | { params: { excerptLimit?: number; query: string; sessionIds: string[] }; result: Record<string, SessionHistoryMatch> } | Cross-session content search, daemon-side. One RPC replaces a window's per-session index/build/search round-trips — indexes are built once in the daemon and shared by every window. |
| history.searchSession | { params: { limit?: number; query: string; sessionId: string }; result: SearchTurnMatch[] } | Transcript search over ONE session, daemon-side. The daemon owns the authoritative turns (live wrapper when an agent is active — fresh mid-run, which a window's load-time snapshot is not) and an LRU index cache shared by every window, so repeat queries pay match cost only. Results come back in TURN ORDER (search is a transcript filter). |
| host.capabilities | { params: { refresh?: boolean }; result: HostCapabilities } | What this host can do: OS, tools on PATH, sandbox, environment kinds, what it allows. Cached a minute; |
| host.installTool | { params: { name: string }; result: { capabilities: HostCapabilities; ok: boolean; output: string } } | Install a missing tool on this host, as the host's user, when it can without root ( |
| integrations.list | { params: Record<string, never>; result: IntegrationInfo[] } | The integrations registered on this host, in registration order. Additive. |
| integrations.register | { params: { detail?: string; kind: string; name: string; state: 'connected' | 'failed' | 'stopped' | 'starting' | 'degraded' }; result: void } | Report an integration this client runs (a channel). Registering a name
again from the same connection replaces it; a name another live
connection registered is refused. It goes away when this connection
closes. Every window gets |
| integrations.update | { params: { detail?: string; name: string; state: 'connected' | 'failed' | 'stopped' | 'starting' | 'degraded' }; result: void } | Change the state of an integration this connection registered; |
interactions.cancelfrom HitlIpcMethods | { params: { reason?: string; requestId: string }; result: { ok: boolean } } | Cancels a pending interaction. |
interactions.listfrom HitlIpcMethods | { params: { sessionId?: string }; result: PendingInteraction[] } | Lists pending interactions (questions and prompts the agent asked the user), optionally for one session. |
interactions.rehydratefrom HitlIpcMethods | { params: { sessionId: string }; result: PendingInteraction[] } | Re-sends the session's pending interactions, for a client that connected after they were raised. |
interactions.rehydrateSessionsfrom HitlIpcMethods | { params: { sessionIds: string[] }; result: PendingInteraction[] } |
|
interactions.respondfrom HitlIpcMethods | { params: { requestId: string; response: InteractionResponse }; result: { ok: boolean } } | Answers a pending interaction. |
| logs.list | { params: Record<string, never>; result: { records: LogRecord[] } } | A zidane-server's recent log records, oldest first: its own lines and its extensions' (setup, runtime warnings), from a bounded in-memory buffer. Other hosts refuse it. Additive. |
| logs.unwatch | { params: Record<string, never>; result: void } | Release one |
| logs.watch | { params: Record<string, never>; result: void } | Follow the log: this connection gets |
| machine.attach | { params: { hostId: string }; result: MachineRegisterParams } | Reverse direction ( |
| machine.call | { params: { method: string; params?: JsonValue }; result: JsonValue } | Runs one machine-protocol method on this server's executor and resolves with its JSON result. Refused when the server does not lend itself as a machine. |
| machine.detach | { params: Record<string, never>; result: { detached: boolean } } | Ends this connection's machine attachment. |
| machines.forget | { params: { machineId: string }; result: { forgotten: boolean } } | Forgets a machine. It disconnects and its kinds stop resolving. |
| machines.links.status | { params: Record<string, never>; result: MachineLinksStatus } | State of this host's machine links: the shares it offers and the servers it uses. |
| machines.list | { params: Record<string, never>; result: MachineInfo[] } | The machines this host knows ( |
| machines.listDirs | { params: { machineId: string; path?: string }; result: { dirs: string[]; path: string; roots: string[] } } | Folders of a machine, for a client's folder picker: the host proxies a
listing to the machine ( |
| machines.share.start | { params: { hostId: string; name: string; roots: string[]; token?: string }; result: MachineLinksStatus } | A local host's machine links ( |
| machines.share.stop | { params: { hostId: string }; result: MachineLinksStatus } | Stops sharing this computer with a server. |
| machines.useServer | { params: { enabled: boolean; hostId: string }; result: MachineLinksStatus } | Turns on or off using a server as this computer's linked server. |
| mcp.instances | { params: { cwd?: string }; result: McpServerInstance[] } | The host's shared MCP server processes ( |
| mcp.remove | { params: { name: string }; result: { removed: boolean } } | Remove an MCP server from the host user's |
| mcp.restart | { params: { cwd?: string; name: string }; result: { restarted: number } } | End |
| mcp.signOut | { params: { name: string }; result: void } | Forget an MCP server's sign-in on the host (its tokens). Every window gets |
| mcp.test | { params: { cwd?: string; kind?: string; name: string }; result: McpServerStatus } | Connect to one of |
| mcp.upsert | { params: { clientSecret?: string; config: McpServerConfig; cwd?: string; scope?: 'user' | 'project' }; result: { created: boolean; name: string } } | Add or replace an MCP server in the host user's |
| models.list | { params: { cwd?: string; kind?: string }; result: { providers: HostModelProvider[] } } | The host's credentialed providers (what its agents can run) and their
models, for a model picker of a session on that host. |
| models.test | { params: { cwd?: string; kind?: string; model: string }; result: HostDecisionTestResult } | Send one tiny prompt with this host's credentials, to check a chat model
answers. |
| onboarding.complete | { params: { records: OnboardingState; settings: OnboardingSettingsChange }; result: HostSettings } | The setup wizard's write: |
| onboarding.detect | { params: { cwd?: string }; result: OnboardingDetection } | What the setup wizard finds on the host's machine for |
| onboarding.providers | { params: { cwd?: string }; result: HostOnboardingProvider[] } | The providers as the wizard's Connect step lists them, with their custom fields and the model each runs when none is picked. Additive. |
| orchestration.answer | { params: { requestId: string; response: InteractionResponse }; result: boolean } | Answers a question or a plan, recording the connection as |
| orchestration.approve | { params: { decision: ApprovalDecision; requestId: string }; result: boolean } | Decides a tool approval (an |
| orchestration.cancel | { params: { sessionId: string }; result: void } | Cancels a session's run. |
| orchestration.createWorker | { params: CreateSessionParams; result: string } | Creates a session (optionally holding orchestration tools and a subscription) and resolves with its id. |
| orchestration.events | { params: EventQuery; result: SessionEvent[] } | Searches the recent session events (runs ended, sessions blocked), newest first. |
| orchestration.list | { params: { limit?: number }; result: WorkerRow[] } | Lists sessions with their live status, newest first, up to |
| orchestration.main | { params: Record<string, never>; result: string | null } | The main session id, creating it (directory-less) when the setting is on and none exists. |
| orchestration.pending | { params: { sessionId?: string }; result: PendingRequestRow[] } | The prompts waiting for an answer (questions, plans, tool approvals), of one session or all. |
| orchestration.read | { params: { full?: boolean; sessionId: string }; result: WorkerSummary } | Summary of one session (with its |
| orchestration.send | { params: { prompt: string; sessionId: string }; result: boolean } | Queues a prompt as the session's next turn; |
| orchestration.steer | { params: { attachments?: PromptAttachment[]; message: string; sessionId: string }; result: void } | Sends a steering message, with optional attachments, to a session's live run. |
| orchestration.transcript | { params: { full?: boolean; limit?: number; sessionId: string }; result: string } | The last |
| orchestration.wait | { params: { sessionId: string; timeoutSec?: number }; result: WaitResult } | Resolves once the session is idle or blocked, or after |
| palette.list | { params: { ctx: PaletteContext; cwd: string }; result: PaletteItem[] } | The command palette items |
| palette.run | { params: { ctx: PaletteContext; cwd: string; itemId: string; source: string }; result: { ok: true; result: PaletteRunResult } | { error: string; ok: false } } | Run |
| palette.unwatch | { params: { cwd: string }; result: void } | Release one |
| palette.watch | { params: { cwd: string }; result: void } | As |
| panels.action | { params: { actionId: string; ctx?: PanelLoadContextInput; cwd: string; panelId: string; payload?: unknown }; result: { ok: true } | { error: string; ok: false } } | Run one of a panel's actions (a row's or the footer's |
| panels.list | { params: { cwd: string }; result: PanelSummary[] } | The side panels |
| panels.load | { params: { ctx?: PanelLoadContextInput; cwd: string; panelId: string }; result: PanelContent } | One panel's content for |
| panels.unwatch | { params: { cwd: string; panelId: string }; result: void } | Release one |
| panels.watch | { params: { cwd: string; panelId: string }; result: void } | Keep a panel's live updates on: this connection gets |
| perf.history | { params: Record<string, never>; result: { samples: PerfSample[] } } | The samples the host holds (the last 5 minutes of watching), oldest first. Additive. |
| perf.threads | { params: { pid: number }; result: { threads: PerfOsThread[] } } | The OS threads of one of the processes the host lists (its own tree), busiest first. Refuses any other pid. Additive. |
| perf.unwatch | { params: Record<string, never>; result: void } | Release one |
| perf.watch | { params: Record<string, never>; result: void } | Follow the host's own performance (Settings › Performance on a server):
this connection gets |
| plans.control | { params: { action: 'stop' | 'drop'; planId: string; sessionId: string }; result: PlansSnapshot } | Stop or drop a plan. Stopping or dropping the plan a live run applies
interrupts that run. Resume is a message ( |
| plans.edit | { params: { op: PlanEditOp; planId: string; sessionId: string }; result: PlansSnapshot } | A user edit to a plan's steps: rename, add or cancel (a step is never
deleted). Through the live agent's session, else the store; refused while
another process runs the session. The host fans |
| plans.get | { params: { sessionId: string }; result: PlansSnapshot | null } | The session's plans (from its live agent, else the store), or |
| prefs.get | { params: Record<string, never>; result: HostComposerPrefs | null } | The picks remembered across apps ( |
| prefs.set | { params: { patch: HostComposerPrefs }; result: void } | Merges picks into |
| presence.list | { params: Record<string, never>; result: SessionPresence[] } | Current presence snapshot — backfill for a freshly opened session list. |
| presence.watch | { params: { sessionId: string }; result: void } | Tag the calling peer as watching a session (one per connection; the TUI opens one connection per activated session). Sent as a notification right after the handshake. Detach is implicit — the daemon recomputes presence when the socket drops. |
| queue.add | { params: { activatedSkills?: string[]; asCommand?: string; attachments?: PromptAttachment[]; clientMessageId?: string; delivery?: QueueDelivery; keepDraft?: boolean; literal?: boolean; metadata?: Record<string, JsonValue>; origin?: TextOrigin; sessionId: string; text: string } & SendRequestId; result: { consumed?: 'steer' | 'followUp' | 'handled'; delivered: 'steer' | 'sent' | 'queued' } } | Sends a message: right away when the session is idle; while a run works, into the run or into the queue ( |
| queue.attachments | { params: { id: string; sessionId: string }; result: PromptAttachment[] | null } | A queued entry's attachments with their bytes; |
| queue.list | { params: { sessionId: string }; result: QueuedItem[] } | Type-ahead queue, host-owned so every window sees and can manipulate
the same list. |
| queue.pushNow | { params: { id: string; sessionId: string }; result: { delivered: 'send' | 'steer' | 'queued' | 'missing' } } | Steer a queued entry, attachments included, into the live run now (falls back to send when idle). |
| queue.remove | { params: { id: string; sessionId: string }; result: boolean } | Removes a queued entry by id. Resolves |
| queue.update | { params: { attachments?: PromptAttachment[]; id: string; sessionId: string; text: string }; result: boolean } | Edit a queued entry in place; order is kept. |
| references.providers | { params: { cwd: string; peek?: boolean }; result: ReferenceProviderWire[] | null } | The extension text reference providers ( |
| references.resolve | { params: { cwd: string; items: { key: string; providerId: string }[] }; result: (ExtensionReferenceView | null)[] } | The views of the keys a client found, in order: |
| rpc.call | { params: RpcCallParams & { cwd?: string }; result: RpcResponseEnvelope } | Calls an extension's RPC method as this connection. Never throws for a
failed call: a declared error, invalid input, a missing provider or a
method whose |
| rpc.cancel | { params: { callId: string }; result: boolean } | Aborts this connection's |
| runtime.reload | { params: Record<string, never>; result: void } | Drop the daemon's cached runtime configs (extension registries, per
cwd) and retire every live agent so the next command or run rebuilds
against what is on disk now. Sent by a window after it reloaded its
own extensions (install, update, remove, |
safelist.listfrom HitlIpcMethods | { params: Record<string, never>; result: { projects: SafelistProject[] } } | The host's "Always allow" entries, per project (its |
safelist.removefrom HitlIpcMethods | { params: { entry: string; project: string }; result: { removed: boolean } } | Revoke one "Always allow" entry of a project; |
| schedules.create | { params: ScheduleInput; result: Schedule } | Create a schedule. The fields are a |
| schedules.delete | { params: { id: string }; result: boolean } | Remove a schedule and its fires. |
| schedules.extensionRemoved | { params: { extensionId: string }; result: void } | An extension was removed: turn off the schedules whose action calls it (kept, marked, for the person to delete). A no-op while the feature is off. |
| schedules.fires | { params: { id: string; limit?: number }; result: ScheduleFire[] } | A schedule's fires, newest first ( |
| schedules.list | { params: ScheduleListFilter; result: Schedule[] } | The stored schedules, oldest first, each with its last fire. |
| schedules.runNow | { params: { id: string }; result: ScheduleFire } | Run a schedule's action now; its next fire does not move. |
| schedules.status | { params: Record<string, never>; result: { enabled: boolean; supported: boolean } } | Whether the feature is on ( |
| schedules.update | { params: { id: string; patch: SchedulePatch }; result: Schedule } | Change the fields of |
| search.set | { params: { active: boolean; query: string; sessionId: string }; result: void } | Replace the shared transcript-search state (notification, per keystroke). |
secrets.listfrom HitlIpcMethods | { params: { sessionId: string }; result: SecretEntry[] } | The secrets of the session's project ( |
secrets.revokefrom HitlIpcMethods | { params: { name: string; sessionId: string }; result: { removed: boolean } } | Remove a secret of the session's project. |
secrets.savefrom HitlIpcMethods | { params: { name: string; sessionId: string; ttl: SecretTtl; value: string }; result: SecretEntry } | Add or replace a secret of the session's project. Refused over a plain-text connection from another machine. |
| server.update.check | { params: Record<string, never>; result: ServerUpdateStatus } | Check for a newer zidane-server release now. With auto-update on, a newer
one installs; off, it is downloaded and verified, and the state turns |
| server.update.configure | { params: { enabled: boolean }; result: ServerUpdateStatus } | Turn the zidane-server's self-update on or off. |
| server.update.install | { params: Record<string, never>; result: ServerUpdateStatus } | Install the release that is |
| server.update.status | { params: Record<string, never>; result: ServerUpdateStatus } | A zidane-server's self-update: its state, the setting, the newest release seen. |
| sessions.appendNote | { params: { blocks: CommandOutputBlock[]; sessionId: string }; result: boolean } |
|
| sessions.appendTurns | { params: { sessionId: string; turns: SessionTurn[]; whenIdle?: boolean }; result: void } | Turns written outside a run, e.g. |
| sessions.artifacts | { params: { kind?: string; limit?: number; sessionId: string }; result: SessionArtifact[] } | Artifacts one session recorded (PRs, branches, commits, files,
extension kinds — see |
| sessions.blockRuns | { params: { sessionId: string }; result: { runs: Record<string, BlockRun> } } | The session's saved block runs, by key ( |
| sessions.cacheImpact | { params: { change: CacheImpactChange; sessionId: string }; result: CacheImpact | null } | What a switch would cost the session's prompt cache, as the host applies
it ( |
| sessions.cacheReport | { params: { limit?: number; sessionId: string }; result: CacheReport | null } | The session's last requests and what the cache did for each
( |
| sessions.compact | { params: { sessionId: string }; result: CompactionReport | null } | Compact now ( |
| sessions.contextBreakdown | { params: { sessionId: string }; result: ContextBreakdown | null } | The session's context usage broken down by category, or |
| sessions.contextSegments | { params: { sessionId: string }; result: ContextSegmentsReport | null } | Every chunk of the session's system prompt with provenance — the
Instructions tab. Built from the live agent's assembly, so it reflects
MCP instructions, extension fragments and the resolved |
| sessions.create | { params: CreateSessionParams; result: SessionRow } | Creates a session and resolves with its row. |
| sessions.createSystemOverride | { params: { sessionId: string }; result: { created: boolean; path: string } } | Seed a user-scope |
| sessions.delete | { params: { sessionId: string }; result: { environment?: EnvironmentTeardownResult } } | Resolves with what happened to the session's environment (a provider may keep it). |
| sessions.deleteTurn | { params: { sessionId: string; turnId: string }; result: void } | History edits ( |
| sessions.editTurnText | { params: { sessionId: string; text: string; turnId: string }; result: void } | Replaces the text of one turn. Refused while the session runs. |
| sessions.environmentActions | { params: { sessionId: string }; result: EnvironmentActionSummary[] } | The per-session commands the session's environment offers right now (push, open PR, …). |
| sessions.export | { params: { format: SessionExportFormat; sessionId: string }; result: SessionExportFile } | The session's transcript rendered as a file to hand to the user: Markdown (title, metadata, every turn) or the session's JSON. Nothing is written on the host. Additive (no version bump). |
| sessions.fork | { params: { sessionId: string; title?: string; turnId: string }; result: { id: string } } | Fork at |
| sessions.generateTitle | { params: { model?: string; providerKey?: string; sessionId: string }; result: { title: string } } | Title the session ON the host: its providers and credentials (a server
session's transcript never goes to the window's provider), the same
generator ( |
| sessions.get | { params: { sessionId: string; turns?: boolean }; result: SessionDocumentHead | null } | The whole session document as the host holds it: the live copy when an
agent is live (turns persisted mid-run, todos kept in memory), else the
stored one, a stale |
| sessions.getHeader | { params: { sessionId: string; usage?: boolean }; result: SessionHeader | null } | One session's header: its list row plus metadata, profile and status,
without turns or runs (the live copy when an agent holds it). What a
window re-reads on |
| sessions.getMeta | { params: { sessionId: string }; result: SessionMeta | null } | One |
| sessions.getToolResult | { params: { callId: string; sessionId: string; turnId?: string }; result: string | null } | The full text of one tool result ( |
| sessions.getTurn | { params: { sessionId: string; turnId: string }; result: SessionTurn | null } | One turn of a session by id, or |
| sessions.getTurns | { params: { from?: number; limit?: number; sessionId: string }; result: { total: number; turns: SessionTurn[]; version?: string } | null } | A slice of a session's turns, |
| sessions.list | { params: { archive?: 'active' | 'all' | 'archived'; projectRoot?: string | null }; result: SessionRow[] } | Lists session rows. |
| sessions.listMeta | { params: { projectRoot?: string | null }; result: SessionMeta[] } | The session list as a window renders it ( |
| sessions.loadEvents | { params: { sessionId: string }; result: StreamEvent[] } | The session's transcript as canonical events. Without |
| sessions.moveEnvironment | { params: { cwd?: string; environment: EnvironmentRequest; removeOldWorktree?: boolean; sessionId: string }; result: { oldWorktree?: EnvironmentTeardownResult } } | Move an idle session to another environment ( |
| sessions.removeBlockRun | { params: { key: string; sessionId: string }; result: void } | Forgets a block's saved run. |
| sessions.resume | { params: { afterSeq: number; epoch: string; sessionId: string }; result: SessionResumeResult } | Reattach without a reload: the session's signals numbered after
|
| sessions.retryEnvironment | { params: { sessionId: string }; result: void } | Provision a failed (or restart-stranded) environment again. |
| sessions.rewind | { params: { inclusive: boolean; sessionId: string; turnId: string }; result: void } | Cut the history at |
| sessions.runBlock | { params: { code: string; language: string; sessionId: string; turnId: string }; result: { runId: string } } | Runs a shell block of a reply (Run here) in the session's folder, with no input. The reply names the run; its
output follows as |
| sessions.runBlockCancel | { params: { runId: string }; result: { cancelled: boolean } } | Stops a Run here this connection started ( |
| sessions.runEnvironmentAction | { params: { actionId: string; sessionId: string }; result: EnvironmentActionResult } | Run one of them in the session's environment (resumed when suspended). |
| sessions.setAgentId | { params: { agentId: string; sessionId: string }; result: void } | Switches the agent the session runs as. |
| sessions.setArchived | { params: { archived: boolean; sessionId: string }; result: void } | Archives or restores a session. |
| sessions.setEffort | { params: { effort: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'adaptive'; sessionId: string }; result: void } | Sets the thinking effort of the session. |
| sessions.setExtensionState | { params: { extension: string; key: string; sessionId: string; value?: JsonValue }; result: void } | One key of an extension's per-session state ( |
| sessions.setFavorite | { params: { favorite: boolean; sessionId: string }; result: void } | Keep the session at the top of lists ( |
| sessions.setFolder | { params: { cwd: string; sessionId: string }; result: void } | Bind to a folder, or back to a plain chat with |
| sessions.setLaunchOverrides | { params: { sessionId: string } & SessionLaunchOverrides; result: void } |
|
| sessions.setModel | { params: { account?: string; effort?: 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'adaptive'; fallbacks?: ModelFallbackRef[]; modelId: string; modelOptions?: Record<string, boolean>; providerKey: string; sessionId: string }; result: void } | The one model-swap contract ( |
| sessions.setModelOptions | { params: { options: Record<string, boolean>; sessionId: string }; result: void } | Replaces the model-specific boolean options of the session. |
| sessions.setPolicy | { params: { policy: SessionPolicy; sessionId: string }; result: void } | Replaces the session's rules ( |
| sessions.setSpace | { params: { sessionId: string; spaceId: string }; result: void } | Move the session to a space ( |
| sessions.setTitle | { params: { sessionId: string; title: string }; result: void } | Renames a session. |
| sessions.sideSession | { params: { sessionId: string }; result: SideSessionLookup } | A session's |
| sessions.systemMd | { params: { sessionId: string }; result: { file: SystemMdFile | null; shadowed: readonly SystemMdFile[] } | null } | Which The |
| sessions.titleStatus | { params: { sessionId: string }; result: string[] } | How the session's title came about, as the session details dialog words
it ( |
| sessions.touch | { params: { sessionId: string }; result: void } | A window appended transcript content OUT-OF-BAND (local |
| sessions.workspaceCopy | { params: { from: string; sessionId: string; toDir: string }; result: EntryResult } | Copies |
| sessions.workspaceCreate | { params: { content?: string; freeName?: boolean; kind: 'file' | 'dir'; path: string; sessionId: string }; result: EntryResult } | Creates a file ( |
| sessions.workspaceEmptyDirs | { params: { sessionId: string }; result: string[] } | The workspace's empty folders, relative to its root (a file listing leaves them out), capped. |
| sessions.workspaceExec | { params: { command: string; cwd?: string; env?: Record<string, string>; sessionId: string; timeoutSeconds?: number }; result: ExecResult } | The session's workspace ( |
| sessions.workspaceExecCancel | { params: { execId: string }; result: { cancelled: boolean } } | Kill a streamed command's process group (this connection's only; |
| sessions.workspaceExecStream | { params: { command: string; cwd?: string; sessionId: string }; result: { execId: string } } | The same command, streamed ( |
| sessions.workspaceFileSize | { params: { path: string; sessionId: string }; result: number | null } | Size in bytes of a file in the session's workspace, or |
| sessions.workspaceListFiles | { params: { options?: WorkspaceListFilesOptions; path: string; sessionId: string }; result: ListFilesEntry[] } | Lists the entries under |
| sessions.workspaceMove | { params: { from: string; sessionId: string; to: string }; result: EntryResult } | Moves (renames) |
| sessions.workspaceReadFile | { params: { path: string; sessionId: string }; result: string } | Reads a text file from the session's workspace. |
| sessions.workspaceRemove | { params: { path: string; sessionId: string }; result: EntryResult } | Removes |
| sessions.workspaceWriteFile | { params: { content: string; path: string; sessionId: string }; result: void } | Writes a text file in the session's workspace. |
| settings.get | { params: Record<string, never>; result: HostSettings } | Reads the host settings. |
| settings.set | { params: { patch: Partial<HostSettings> }; result: HostSettings } | Applies a partial settings patch and resolves with the full settings after it. |
| sidebar.getSpace | { params: Record<string, never>; result: string | null } | The space a client's sidebar showed last, |
| sidebar.getViews | { params: Record<string, never>; result: Record<string, unknown> } | The sidebar views a client saved on this host, by space id ( |
| sidebar.setSpace | { params: { spaceId: string }; result: void } | Saves the space the sidebar shows. Additive. |
| sidebar.setView | { params: { spaceId: string; view: Record<string, unknown> }; result: void } | Saves one space's sidebar view (at most 4 KiB of JSON), stored as given: the kit's record is the filter axes plus |
| skills.browse | { params: { source: string }; result: SkillSourceListing } | The skills of a source ( |
| suggest.resolve | { params: { caret: number; seq: number; sessionId: string; text: string }; result: { candidates?: string[]; seq: number; suggestion: string | null } } | Resolve inline ghost-text autocomplete daemon-side (the typing
window's request IS the single computation): canonical resolver
against the session cwd's extension registry. Latest-wins per
session — a |
| sync.claim | { params: { categories?: SyncCategory[]; deviceId: string; deviceName: string; keys?: string[]; takeover?: boolean }; result: SyncClaimResult } | Makes the caller the settings source device. When another device is the source, the result says which, unless |
| sync.push | { params: { category: SyncCategory; deviceId: string; payload: SyncPayload }; result: SyncPushResult } | Applies one category's snapshot from the source device. |
| sync.release | { params: { deviceId: string }; result: { released: boolean } } | Stops the source device's sync. |
| sync.reset | { params: { field: string }; result: { reset: boolean } } | Drops the local override of one field so sync applies to it again. |
| sync.status | { params: Record<string, never>; result: SyncStatus } | Settings sync, a client's computer → this server ( |
| terminal.ack | { params: { clientId: string; offset: number; terminalId: string }; result: void } | Acknowledges terminal output up to |
| terminal.adopt | { params: { draftId: string; sessionId: string }; result: TerminalAdoptResult } | The draft became |
| terminal.attach | { params: { clientId: string; maxLines?: number; terminalId: string }; result: TerminalAttachResult } |
|
| terminal.close | { params: { terminalId: string }; result: void } | Closes a terminal. |
| terminal.detach | { params: { clientId: string; terminalId: string }; result: void } | Detaches a view from a terminal. |
| terminal.open | { params: TerminalOpenInput; result: TerminalInfo } | Opens a terminal in a session's environment. |
| terminal.openInProject | { params: TerminalProjectOpenInput; result: TerminalInfo } | Opens a terminal bound to a project rather than a session. |
| terminal.projectState | { params: TerminalProjectStateInput; result: TerminalProjectState } | Terminals without a session: a shell on the host's machine in a
project's folder, or in a new-chat draft's ( |
| terminal.registerViewer | { params: { viewerId: string }; result: { ok: boolean } } | This connection can show terminals (the desktop app). While at least one viewer is attached, agents get the terminal tools; the registration is dropped with the connection. |
| terminal.releaseDraft | { params: { draftId: string }; result: void } | The draft was discarded (or became a server session): its terminals go back to the project. |
| terminal.resize | { params: { claim?: boolean; clientId: string; cols: number; rows: number; terminalId: string }; result: void } | Resizes the terminal to a view's size. |
| terminal.restart | { params: { terminalId: string }; result: TerminalInfo } | Restarts a terminal's process and resolves with its info. |
| terminal.setHidden | { params: { hidden: boolean; terminalId: string }; result: void } | Hides a terminal from the agent, or shows it again. |
| terminal.state | { params: { sessionId: string }; result: TerminalSessionState } | Terminals, run by the host in the session's environment. |
| terminal.unregisterViewer | { params: { viewerId: string }; result: { ok: boolean } } | Withdraws a viewer registered with |
| terminal.write | { params: { clientId?: string; data: string; response?: boolean; terminalId: string }; result: void } |
|
| tokens.create | { params: { name: string; scope: ServerTokenScope }; result: ServerTokenInfo & { token: string } } | Create a token with a scope ( |
| tokens.createMachineToken | { params: { name: string }; result: { id: string; name: string; token: string } } | Mint a |
| tokens.list | { params: Record<string, never>; result: ServerTokenInfo[] } | This server's tokens, revoked ones included, never their secrets (a zidane-server only). Additive. |
| tokens.machineInvite | { params: { name?: string; ttlMs?: number }; result: { code: string; expiresAt: number } } | Issue a one-time machine join code (a zidane-server only): a machine posts it to
|
| tokens.pair | { params: { name?: string; scope: 'chat' | 'admin'; ttlMs?: number }; result: { code: string; expiresAt: number } } | Issue a one-time pairing code ( |
| tokens.revoke | { params: { id: string }; result: { revoked: ServerTokenInfo[] } } | Revoke a live token by id, with the live tokens it minted; their connections drop and the runs and terminals they started stop. Audited. Additive. |
| tokens.revokeSelf | { params: Record<string, never>; result: { revoked: ServerTokenInfo[] } } | Revoke the token this connection authenticated with, and the live tokens it minted (a browser's sign out). Any client scope may: it only gives up its own access. Audited. Additive. |
| ui.client.announce | { params: UiClientAnnounce; result: void } | What this connection shows and whether it shows dialogs: dialogs
( |
| ui.client.reply | { params: { requestId: string; result: unknown }; result: boolean } | Answers a |
| ui.dialog.answer | { params: { answer?: unknown; dialogId: string }; result: boolean } | Answers a |
| ui.dialog.validate | { params: { dialogId: string; key: string; value: unknown }; result: string | null } | Checks one value of a |
| usage.github | { params: { probe?: boolean }; result: ProviderUsageSnapshot[] } | GitHub's API limits as the host's GitHub client last saw them, per
GitHub host; |
| usage.providers | { params: { refresh?: boolean }; result: readonly ProviderUsageSnapshot[] } | The plan and subscription windows of each provider the host holds a
credential for (every account), probed with the host's credentials and
cached a few minutes; |
| usage.summary | { params: { range: UsageRange }; result: UsageSummary } | Token spend, models, streaks and activity over |
PairBrowserOptionsInterface#
Options for pairBrowser.
interface PairBrowserOptionsProperties
| Name | Type | Description |
|---|---|---|
| fetch? | (url: string, init: RequestInit) => Promise<Response> | The fetch to use. Default: |
PairedBrowserInterface#
A paired browser's device token.
interface PairedBrowserProperties
| Name | Type | Description |
|---|---|---|
| id? | string | The token's id, the one |
| scope | 'chat' | 'admin' | The scope the code was issued with. |
| serverName? | string | The server's name, when it has one ( |
| token | string | The token, for |
ServerClientInterface#
A connection to a zidane-server: typed calls, signals and its state.
interface ServerClientProperties
| Name | Type | Description |
|---|---|---|
| call | <M extends keyof IpcMethods>(method: M, params: IpcParams<M>) => Promise<IpcResult<M>> | Calls a method. Waits while (re)connecting; fails when the connection drops mid-call. |
| can | (method: keyof IpcMethods) => boolean | Whether this connection may call |
| close | () => void | Closes the connection and stops reconnecting. |
| hello | () => HelloResult | null | The current connection's hello, |
| notify | <M extends keyof IpcMethods>(method: M, params: IpcParams<M>) => void | Sends a notification (no answer). Dropped while not open. |
| onOpen | (listener: (hello: HelloResult, reconnected: boolean) => void) => () => void | Called after every handshake, |
| onSignal | (listener: (signal: HostSignal, meta?: SignalMeta) => void) => () => void | Called with every signal the host fans out, and its position in its session; returns its unsubscribe. |
| onState | (listener: (state: ServerClientState) => void) => () => void | Called on every state change; returns its unsubscribe. |
| ready | Promise<HelloResult> | Resolves with the first hello; rejects when the client is refused or closed before it. |
| state | () => ServerClientState | The connection's state now. |
ServerClientOptionsInterface#
Options for createServerClient.
interface ServerClientOptionsProperties
| Name | Type | Description |
|---|---|---|
| appVersion? | string | Reported in the server's logs and audit (default |
| connectTimeoutMs? | number | How long an attempt may take to open and finish its handshake before it is dropped and retried, in ms (default 10 000). |
| fetch? | typeof fetch |
|
| heartbeatMs? | number | Ping interval in ms; a ping unanswered by the next one drops the connection (default 20 000; 0: off). |
| onState? | (state: ServerClientState) => void | Called on every state change. |
| reconnect? | false | { initialMs?: number; maxMs?: number } | First reconnect delay and its ceiling, in ms (default 500 doubling to 15 000). |
| token? | string | A client token ( |
| url | string |
|
| WebSocket? | (url: string | URL, protocols?: string | string[]) => WebSocket | WebSocket constructor. Default: the global one. |
SignalMetaInterface#
What a signal listener gets beside the signal: its number in its session, when it has one.
interface SignalMetaProperties
| Name | Type | Description |
|---|---|---|
| seq | number | Position of the signal in its session. Starts at 1 and has no gaps within one host process. |
Types#
ClientScopeType#
A client token's reach: CLIENT_SCOPES.
type ClientScope = typeof CLIENT_SCOPES[number]IpcMethodNameType#
Name of any method in IpcMethods.
type IpcMethodName = keyof IpcMethodsIpcParamsType#
Params type of the method M in IpcMethods.
type IpcParams<M extends IpcMethodName> = IpcMethods[M]['params']Type parameters
| Name | Type | Description |
|---|---|---|
| M | extends IpcMethodName |
IpcResultType#
Result type of the method M in IpcMethods.
type IpcResult<M extends IpcMethodName> = IpcMethods[M]['result']Type parameters
| Name | Type | Description |
|---|---|---|
| M | extends IpcMethodName |
ServerClientStateType#
Where a ServerClient's connection is.
type ServerClientState =
| { attempt: number; status: 'connecting' }
| { hello: HelloResult; status: 'open' }
| { attempt: number; error: string; inMs: number; status: 'retrying' }
| { message: string; reason: ServerRefusal; status: 'refused' }
| { status: 'closed' }ServerPairFailureType#
Why a pairing failed. The server's answers: invalid (no such code, or not a
code's shape), expired, used (spent, or burned by wrong attempts),
rate-limited, forbidden (an origin, proxy or transport its upgrade policy
refuses). And the client's: unavailable (the server has no pairing route:
too old, or running without auth) and network (no answer it understands).
type ServerPairFailure =
| 'invalid'
| 'expired'
| 'used'
| 'rate-limited'
| 'forbidden'
| 'unavailable'
| 'network'ServerRefusalType#
Why a server refused this client for good: token (unknown or revoked), the server's
admission refusals (origin not allowed, insecure-transport, untrusted-proxy, a
scope it may not connect with), or a protocol the two don't share.
type ServerRefusal =
| 'token'
| 'origin'
| 'insecure-transport'
| 'untrusted-proxy'
| 'scope'
| 'protocol'Re-exports#
These names are documented on the entry point that owns them.