What changed, release by release.
Every release's mods API against the one before it: which nouns, verbs, events and types it added, which it removed, and which changed shape, with the lines that moved. A removal is marked breaking; a change that took something out may break a mod; one that only added to a shape is marked extended.
v2.1.325
No change to the surface since 2.1.324v2.1.324
+3 added · 0 removed · 5 changed · 15 docs only since 2.1.323Types
-
color: ThemeColor; gradient?: never; vector?: never; image?: never;} -
gradient: ThemeGradient; color?: never; vector?: never; image?: never;} -
A still ground behind the conversation: a flat color, a gradient, a drawing in paths or a picture. A scene draws what moves, and any other pattern.
export type ThemeGround = ThemeColorGround | ThemeGradientGround | ThemeVectorGround;export type ThemeGround = ThemeColorGround | ThemeGradientGround | ThemeImageGround | ThemeVectorGround; -
A live scene: what
ui.renderanswers forBackdrop, and how the surface frosts its panels over it.color?: never; gradient?: never; vector?: never; image?: never;}; -
vector: ThemeVector; color?: never; gradient?: never; image?: never;} - added
ThemeImageinterfaceA picture from the mod's folder, filling its box unless
sizeandrepeattile it. - added
ThemeImageGroundinterface - added
ThemeImageWiretypeHow a
Themeanswer names a ground's image: a surface pulls the bytes byid, and lays them out bysizeandrepeatas the mod gave them. The bytes are the mod's own, sowidthandheight, the size in the file's header before any EXIF rotation, are hints: a surface reads the file's header with its own decoder, decodes off the main thread, caps the pixels at 4096 on a side and, if it can't draw the picture, keeps the app's own ground.
15 docs only: reworded, same shape
$.model.classifyverbPicks one of
labelsfortextwith one completion over$.model.completeand a fixed classifier prompt.$.model.completeverbRuns one text completion through the session's own API client and resolves a result: the reply's text and cost, or why there is no text.
$.session.usageverbReturns when the session began, and the context window's fill, the rate-limit windows and the cost as the status line has them, itemized. The cost includes every mod's answered
$.modelcalls.engine.createeventRuns while
$is being built, once per load or reload of this plugin and before any other hook of it;next(e)resolves to$built so far.MatchertypeWhat
on(event, matcher, hook)takes for an argument of typeI: the shape of theethe hook wants, a partial of it at any depth.PromptContextResulttypeWhat a
prompt.contexthook returns: the blocks the conversation carries, in order; one left out is not sent.RenderPropsOftypeThe plain-data props of each renderable component, as
ui.rendersees them undere.props; a hook rewrites them withnext({ ...e, props }).SessionCosttypeWhat the session has cost, as
/costand the status line total it.SessionUsagetypeWhat
$.session.usage()answers: when the session began, the context window's fill, the account's rate-limit windows and the session's cost.TIERSconstThe chain's five tiers, outermost first: earlier is outer is more authority, and same-event hooks nest in this order and no other way.
ThemeBackdroptypeThe
backdropattribute of$.theme.set: what is behind the conversation.scenemakes a live scene, andcolor,gradient,vectororimagemake a still ground.ThemeColortypeA color in a still
backdrop. A surface uses a raw color as it is, works out a name from the look'scolorsin the look's mode, or from the app's own colors where the look gives none, and refuses the ground over anything else. Annotate a color kept in an object or a list with this type, or it widens tostring.ThemeTilinginterfaceHow a drawing, a gradient or a picture lies in its box.
ThemeVectorinterfaceA drawing in SVG path data, the text of a path's
dattribute.TiertypeOne of the chain's five tiers (TIERS), outermost first; on every
next.traceentry, and whatnext.to(e, tier)names.
v2.1.323
+15 added · 0 removed · 11 changed · 31 docs only since 2.1.322Types
-
The element table a surface module draws with,
surface.elements: the terminal's (Elements) lessClient,Raster,ImageandProgress.export type ClientElements = Omit<Elements['terminal'], 'Client' | 'Raster' | 'Image'>;export type ClientElements = Omit<Elements['terminal'], 'Client' | 'Raster' | 'Image' | 'Progress'>; -
Each surface's primitive tags and their prop types, by
e.surface, for the surfaces the plugin was compiled against.Link: ElementConstructor<LinkProps>; Code: ElementConstructor<CodeProps>; Markdown: ElementConstructor<MarkdownProps>; Progress: ElementConstructor<ProgressProps>; Client: ElementConstructor<ClientProps>; Raster: ElementConstructor<RasterProps>; Image: ElementConstructor<ImageProps>;… Link: ElementConstructor<LinkProps>; Code: ElementConstructor<CodeProps>; Markdown: ElementConstructor<MarkdownProps>; Progress: ElementConstructor<ProgressProps>; Client: ElementConstructor<ClientProps>; }; mobile: {… Link: ElementConstructor<LinkProps>; Code: ElementConstructor<CodeProps>; Markdown: ElementConstructor<MarkdownProps>; Progress: ElementConstructor<ProgressProps>; }; vscode: { Box: ElementConstructor<BoxProps>;… Link: ElementConstructor<LinkProps>; Code: ElementConstructor<CodeProps>; Markdown: ElementConstructor<MarkdownProps>; Progress: ElementConstructor<ProgressProps>; };} -
What
$.ui.invalidatetakes: a render event, or one of the seven events whose answers the engine caches for the session.export type InvalidatableEventName = RenderEventName | 'prompt.section' | 'prompt.context' | 'prompt.attachment' | 'tool.describe' | 'command.describe' | 'config.describe';export type InvalidatableEventName = RenderEventName | 'prompt.section' | 'prompt.context' | 'prompt.attachment' | 'tool.describe' | 'tool.list' | 'command.describe' | 'config.describe'; -
The argument of
$.ui.open: which pane, its title, whether it asks the person's keyboard, its dialog manners, its size (rows, columns), its seat.backgroundColor?: Color; rows?: number; columns?: number; placement?: 'widget';}; -
Everything
ui.rendercan draw: one name per component that has a render site; a matcher narrows on it.export type RenderComponent = 'AskUserQuestion' | 'UserMessage' | 'AssistantMessage' | 'ToolUse' | 'ToolResult' | 'ToolGroup' | 'ToolProgress' | 'CommandOutput' | 'Spinner' | 'TurnDuration' | 'InfoNotice' | 'SessionMode' | 'PromptHint' | 'AbovePrompt' | 'Pane' | 'Placed' | 'Backdrop';export type RenderComponent = 'AskUserQuestion' | 'UserMessage' | 'AssistantMessage' | 'ToolUse' | 'ToolResult' | 'ToolGroup' | 'ToolProgress' | 'CommandOutput' | 'Spinner' | 'TurnDuration' | 'InfoNotice' | 'SessionMode' | 'PromptHint' | 'AbovePrompt' | 'AbovePromptList' | 'Pane' | 'Placed' | 'Backdrop'; -
What a render hook returns, and what
next(e)resolves to: a plain-data tree of elements (a Box or Text is a StyledElement), strings as children.props: SvgProps; children?: undefined;} | { type: 'Progress'; props: ProgressProps; children?: undefined;} | { type: 'Raster'; props: RasterProps; raster: { -
One
ui.renderinput, for a component narrowed to one surface.surface: P; component: C; requestId: string; plugin?: string; viewport?: RenderViewport; props: RenderPropsOf[C];}; -
The plain-data props of each renderable component, as
ui.rendersees them undere.props; a hook rewrites them withnext({ ...e, props }).word: string; durationMs: number; isExpanded?: boolean; waitingFor?: { agents: ReadonlyArray<{ id: string; agentType: string; tool_use_id?: string; }>; workflows: number; }; waitingFor?: WaitingFor; onScreen?: OnScreen | null; }; InfoNotice: {… scroll: SiteScroll; view: SiteView; }; AbovePromptList: { rows: readonly AbovePromptRow[]; hasSurvey: boolean; isCollapsed: boolean; isWorking: boolean; maxRows: number; bodyColumns: number; scroll: SiteScroll; view: SiteView; }; Pane: { title: string; isFocused: boolean; isPromptCovered?: true; bodyColumns: number; placement: 'dock' | 'inline'; placement: 'dock' | 'inline' | 'widget'; anchoredEdges?: readonly ('top' | 'right' | 'bottom' | 'left')[]; scroll: SiteScroll; view: SiteView; };… onScreen?: OnScreen | null; }; Backdrop: { id: string; scene: string; plugin: string; glass: { blur: number; tint?: string; opacity: number; } | false; colorScheme?: 'light' | 'dark'; overrideColorScheme?: 'light' | 'dark'; };}; -
The
backdropattribute of$.theme.set: what is behind the conversation.scenemakes a live scene, andcolor,gradientorvectormake a still ground.export type ThemeBackdrop = { id: string; glass?: ThemeBackdropGlass | false; colorScheme?: 'light' | 'dark';};export type ThemeBackdrop = ThemeScene | ThemeGround; -
The argument of
$.theme.set: one object of named attributes, so a later attribute is an addition and never a change of the call.export type ThemeSetArgs = { backdrop?: ThemeBackdrop; overrideColorScheme?: 'light' | 'dark'; colors?: ThemeColors;}; -
One tool as
$.tool.list()returns it and atool.listhook answers it.name: string; description: string; mcp: boolean; inputSchema?: Record<string, unknown>;}; -
One plugin's row of the band: what its
AbovePromptchain settled to, with a Progress root inside a Box marked as that plugin's. -
The props of
Progress, how far along a task is. A leaf: no children. -
A color in a still
backdrop. A surface uses a raw color as it is, works out a name from the look'scolorsin the look's mode, or from the app's own colors where the look gives none, and logs and drops anything else. Annotate a color kept in an object or a list with this type, or it widens tostring. -
The design system's color names. A surface works each one out from the look's
colors, so one rule serves light and dark. A name is not a key ofcolors, and aThemeKeyfrom a drawn tree isn't one of these names. In the stock palettefill-primaryis near-black in light and near-white in dark, not the brand color. -
Colors that run across their box.
-
A still ground behind the conversation: a flat color, a gradient or a drawing in paths. A scene draws what moves, and any other pattern.
-
A scene's keys, which no ground has.
-
A live scene: what
ui.renderanswers forBackdrop, and how the surface frosts its panels over it. -
How a drawing or a gradient lies in its box.
-
A drawing in SVG path data, the text of a path's
dattribute. -
One background agent a line waits on, as
ui.rendersees it underwaitingFor.agents. -
What a line waits on, as
ui.rendersees it underwaitingFor.
31 docs only: reworded, same shape
$.mcpnounThe engine's MCP servers: calling a connected one's tools, and connecting one the plugin lists itself or /mcp lists.
$.mcp.connectverbConnects an MCP server if the session has not already: one this plugin's own manifest lists, by its key, or any server /mcp lists.
$.theme.setverbSets the session's theme from one object of named top-level attributes, the whole theme: what a set leaves out is gone.
backdropis a scene, drawn behind the conversation by whatui.renderanswers forBackdrop: full window on desktop under its frosted panels, full screen on mobile under one veil (tintandopacity, not yetblur). Or it's a still ground, which a surface draws with no hook.colorsis a theme for a surface to paint itself with, where it reads one. With no scene, noui.renderhook is asked to draw. Display only:--resumebrings none back and a plugin that unloads takes its own with it, so set it atsession.start.$.tool.listverbReturns the tools the model can call now, built-in and MCP alike, in the order the model sees them, through the
tool.listhooks.$.ui.closeverbCloses one of the open panes; an id that is not open is left alone, and a pane another plugin holds is refused.
$.ui.openverbOpens a pane, a framed region the surface places and this plugin draws by hooking
ui.renderfor{ component: "Pane" }; says if it is drawn.tool.listeventThe argument of
$.tool.list(), and of the engine's own raise of its tools: what the hooks answer that raise is the session's tool pool (ToolInfo).AnyEventHooktypeThe hook
on("*", hook)takes: it runs on every event, plugin nouns no declaration names included, soeisunknownandnextis StarNext.ButtonPropstypeThe props of
Button, every surface's pressable: an address, a label or children, the closure a press runs, and the styles a hover overrides.ClientSurfacetypeWhat a surface module's function receives as its second argument: its elements, the instance's local state, its region, input, clock and port.
ElementQuerytypeWhat a mounted drawing's
findandfindAllmatch an element on, every field given at once: its tag, itskey, and the text it shows.FoundElementtypeOne element of a mounted drawing as
findreturns it: the description the plugin's hook (or aClient's module) built, read as plain data.HookBudgettypeThe time bounds every hook runs under, in milliseconds: the engine's own constants are typed by these members, and
next.budgetreads the live one.JsonValuetypePlain data: what JSON holds, and what crosses between a plugin's hooks module and its surface module whole (a
Client's props, a post's data).MatchertypeWhat
on(event, matcher, hook)takes for an argument of typeI: the shape of theethe hook wants, a partial of it at any depth.McpConnectRefusaltypeWhy
$.mcp.connectleft a server unconnected, in one word;unlistedtoo where the session's host runs the plugin's servers itself.MountedMemberstypeEvery member a mounted drawing of component
Ccan have;Mounted<P, C>keeps the ones surfacePhas the element for (ElementOfAct).NarrowedMembertypeOne object member
Eunder object patternP,Dlevels down:neverwhen a key ofPis impossible on it (ImpossibleKeys), elseEnarrowed.SessionReceiveOrigintypeWhere an inbound delivery came from, as the bridge classified it from the server's stamps:
prompt.submit'se.origin, less what never arrives.SkillPromptInputtypeThe input of
skill.prompt: one skill's prompt, at the moment the engine expanded it for the model.ThemeBackdropGlasstypeHow a surface keeps its text readable over a backdrop: the desktop app frosts its own panels, and the mobile app lays one veil over the backdrop. Each key absent takes the surface's default, so
{}is the default glass.ThemeColorstypeThe
colorsattribute of$.theme.set: a whole palette as JSON data, for a surface to paint itself with, where it reads one.ThemeResulttypeWhat
$.theme.setand$.theme.clearresolve to, and what atheme.setortheme.clearhook's{ value }holds.ToolCheckResulttypeWhat a
tool.checkhook returns and whatnext(e)resolves to: the verdict, why, and what stands behind it, never who answers it.TurnStepInputtypeThe input of
turn.step: one model request inside a turn, at the moment the engine is about to send it; the bottom of the chain sends it.UiFocusInputtypeThe input of
ui.focus: a site's focus ring about to move onto one of the elements a hook drew in it (aButton,InputorSelect), or off them.UiInputArgumenttypeThe argument of
ui.input: a change of, or a submit from, anInputa render hook drew. Flat and frozen like every event's.UiOpenResulttypeWhat
$.ui.openresolves to and what aui.openhook's{ value }holds.UiPanetypeOne of this plugin's open panes as
$.ui.panes()lists it: the pane's id and title, and where it stands with the person right now.UiPressArgumenttypeThe argument of
ui.press: a press on aButtona render hook drew, or on an answeredMarkdownlink. Flat and frozen like every event's.UiSelectArgumenttypeThe argument of
ui.select: a pick from aSelecta render hook drew. Flat and frozen like every event's.
v2.1.322
No change to the surface since 2.1.321v2.1.321
+7 added · 0 removed · 10 changed · 13 docs only since 2.1.319The engine
-
Takes back one of this plugin's own notifications by its
key: a host that raises notifications removes it, shown or still booked. The frame names this plugin's source, which keys are scoped by. Await the$.ui.notifyfirst: a cancel sent before it is out takes back nothing.
Events
-
The argument of
$.ui.cancelNotify(key): the key of the plugin's own notification to take back; rewritable, deniable, answerable, likeui.notify. Only a client's surface holds one to take.
Types
-
Options of
$.http.fetch.export type HttpInit = { method?: string; headers?: Record<string, string>; body?: string; body?: HttpBody; compress?: HttpCompress; auth?: string; socketPath?: string;}; -
What
$.http.fetchresolves with.ok: boolean; headers: Record<string, string>; text: string; isStreaming?: true; sendIndex?: number;}; -
Every member a mounted drawing of component
Ccan have;Mounted<P, C>keeps the ones surfacePhas the element for (ElementOfAct).advance: (ms: number) => Promise<void>; resize: (size: MountResizeTarget) => Promise<void>; redraw: (props?: RenderPropsOf[C]) => Promise<void>; keepsBeneath: () => Promise<boolean>; unmount: () => Promise<void>;}; -
Options of
$.ui.notify.export type NotifyOptions = { title?: string; key?: string; delayMs?: number; at?: number; untilBack?: boolean;}; -
What each call on
$answers (thevalueof its event's result), by event name.'ui.copy': UiCopyResult; 'ui.view': UiViewResult; 'ui.notify': UiNotifyResult; 'ui.cancelNotify': { isSent: boolean; }; 'ui.blit': UiBlitResult; 'fs.read': string | FsBytes; 'fs.write': void; -
What a
prompt.sectionhook returns: the text the prompt carries for that section, or null to leave it out.export type PromptSectionResult = { text: string | null; breakPromptCache?: boolean;}; -
The plain-data props of each renderable component, as
ui.rendersees them undere.props; a hook rewrites them withnext({ ...e, props }).}; AbovePrompt: { hasSurvey: boolean; isCollapsed: boolean; isWorking: boolean; maxRows: number; bodyColumns: number; -
The argument of
$.theme.set: one object of named attributes, so a later attribute is an addition and never a change of the call.export type ThemeSetArgs = { backdrop: ThemeBackdrop; backdrop?: ThemeBackdrop; colors?: ThemeColors;}; -
What a
tool.describehook returns: the description the model sees for that tool and, when the hook moves it, where the tool waits (ToolDeferral).export type ToolDescribeResult = { description: string; isDeferred?: ToolDeferral; breakPromptCache?: boolean;}; -
What
$.ui.notifyresolves to and what aui.notifyhook's{ value }holds: whether a channel sent it (isSent) and which, else why not.export type UiNotifyResult = { isSent: true; channel: 'iterm2' | 'iterm2_with_bell' | 'kitty' | 'ghostty' | 'terminal_bell'; channel: 'iterm2' | 'iterm2_with_bell' | 'kitty' | 'ghostty' | 'terminal_bell' | 'client';} | { isSent: false; reason: 'disabled' | 'no-channel' | 'no-surface' | 'refused'; -
The argument of
$.ui.cancelNotify. -
A request body: text, or bytes that are not valid UTF-8 as
{ base64 }. -
The encoding the engine gives a request body beneath the hooks.
-
One mode's colors in
ThemeColors: a six-digit hex color such as#1e1e2eunder the name of each design system token the theme sets. The type checks the leading#alone. -
The
colorsattribute of$.theme.set: a whole color theme as JSON data, for a surface to paint itself with, where it reads one.
13 docs only: reworded, same shape
$.http.fetchverbFetches
urlthrough the host (never the plugin's own network) and resolves{ status, ok, headers, text }once the body is read.$.model.forkverbRuns one tool-less completion over the session's OWN transcript as the main thread last sent it, so the API serves that prefix from its cache.
$.theme.setverbSets the session's theme from one object of named top-level attributes, the whole theme: what a set leaves out is gone.
backdropis drawn behind the conversation by whatui.renderanswers forBackdrop: full window on desktop under its frosted panels, full screen on mobile under one veil (tintandopacity, not yetblur).colorsis a theme for a surface to paint itself with, where it reads one. With nobackdrop, noui.renderhook is asked to draw. Display only:--resumebrings none back and a plugin that unloads takes its own with it, so set it atsession.start.$.tool.callverbCalls a tool: the event
tool.call, the same call the engine makes for the model's tool calls, under atool_use_idof its own.$.ui.invalidateverbRe-runs an event whose results the engine caches:
ui.renderdraws the instances this plugin may draw again; the others drop the cached answers.$.ui.notifyverbRaises a native notification of
textthrough the person's own notification channel, the one theirpreferredNotifChannelnames.prompt.sectioneventFires once per named section of the system prompt, when the engine assembles it;
next(e)resolves to{ text }as core computed it.tool.describeeventFires when the engine first renders the tool's schema in a session;
next(e)resolves to{ description, isDeferred? }.SkillPromptInputtypeThe input of
skill.prompt: one skill's prompt, at the moment the engine expanded it for the model.TestBodytypeA test: the engine's
$, andon, a plugin's registrar, whose hooks sit beneath every plugin; beneath them the bottom hook throws, naming its event.ThemeResulttypeWhat
$.theme.setand$.theme.clearresolve to, and what atheme.setortheme.clearhook's{ value }holds.TurnStepInputtypeThe input of
turn.step: one model request inside a turn, at the moment the engine is about to send it; the bottom of the chain sends it.UiScrollResulttypeWhat a
ui.scrollhook returns, whatnext(e)resolves to, and what$.ui.scrollhands back:{}once the window moved, or why it did not.