Public feature reference
This chapter is the compact index to the entire supplied public inventory. It is intentionally grouped by purpose rather than presented as one giant type dump.
ExtensionAPI: registration and module access
| Members | Practical contract | Worked example |
|---|---|---|
logger | File logging; avoid console output that corrupts TUI/RPC channels and avoid logging secrets | Lab status; native delegation |
typebox, arktype, zod | Injected compatible schema authoring | Seed Desk; Package Lab |
pi | Injected coding-agent package exports; availability still follows the matching host | SDK-oriented integrations |
on | Subscribe using the exact supported event name and return shape | Event reference |
registerTool | Register a schema-shaped machine capability | Seed Desk; Review Desk |
registerCommand | Register a human/host slash-command handler | All principal stories |
registerShortcut | Register a nonreserved operator key binding | Phrase-key exercise |
registerFlag, getFlag | Declare/read a boolean or string flag; read your own registered name | seed-quiet |
setLabel | Set the extension’s display label in the supplied concrete implementation | Lab status |
registerMessageRenderer | Render a named custom message type | Review Desk |
registerAssistantThinkingRenderer | Add supplemental UI after visible thinking blocks | Thinking-length exercise |
registerComposerShape | Register a complete composer rendering contract | Workbook Field Dock |
registerFileWriteFallback, registerFileDeleteFallback | Register separate native permission-denied mutation seams | File fallbacks |
registerProvider, unregisterProvider | Register/remove runtime model-provider overrides | Providers |
events | Shared runtime event bus with on, emit, clear | Field events |
setLabel compatibility edge: the public type advertises both extension-label and entry-label usage, but ConcreteExtensionAPI.setLabel(label) only assigns the extension label in this snapshot. Do not claim that the two-argument form labels a journal entry here. Do not cast the read-only session manager to bypass the public boundary.
ExtensionAPI: live actions
| Members | Practical contract |
|---|---|
sendMessage | Custom conversation/context message; optional steer/follow-up/next-turn and turn trigger |
captureSessionTarget, deliverMessage | Persistent owner anchor and deduplicated complete delivery with a receipt |
sendUserMessage | User-style prompt/queue; no slash-command dispatch |
appendEntry | Custom state entry, not model-visible content |
exec | Program/argv execution with cwd, timeout and cancellation |
getActiveTools, getAllTools, setActiveTools | Enabled-set inspection, full registry metadata and asynchronous selection |
getCommands | Dynamic command metadata, not a universal list of built-ins |
setModel | Credential-aware model selection |
getThinkingLevel, setThinkingLevel | Effective thinking-level control |
getServiceTiers, setServiceTier | Detached per-family tier snapshot and subsequent-request override |
getSessionName, setSessionName | Read/set persisted session naming, distinct from terminal title |
getCommands() aggregates extension commands, loaded custom/MCP prompt commands and enabled skill commands through getSessionSlashCommands(). Built-ins are intentionally excluded from that helper. Frontends may advertise a larger command list.
RegisteredCommand contains name, optional description, optional getArgumentCompletions, and handler. Completion values represent the complete argument text, not just an appended fragment.
ExtensionContext
| Members | What to remember |
|---|---|
ui, mode, hasUI | Mode and actual method support matter; hasUI is not “all TUI methods work” |
cwd | Current at context creation; do not retain it as a permanent workspace identity |
sessionManager | Read-oriented session/journal access |
modelRegistry | Host registry and credential-resolution access; prefer models for selection queries |
model, models | Current/request-specific model and read-only query facade |
localProtocolOptions | Calling-session local:// mapping for compatible bridges |
getContextUsage | Estimated context tokens/window/percentage; can be undefined |
getAsyncJobSnapshot | Read-only owner-scoped job state; can be null |
isIdle, hasPendingMessages | Snapshot predicates, not locks |
abort | Request cancellation of the current agent operation |
shutdown | Request host shutdown; host-specific and not an immediate process.exit guarantee |
getSystemPrompt | Effective prompt blocks; treat returned content as sensitive |
compact | Request host maintenance at a safe boundary |
memory | Optional status/search/save runtime |
setInterval, setTimeout, clearTimer | Managed timer lifecycle |
invokeTool | Optional same-name native built-in delegation |
isProjectTrusted | Compatibility method returning true, not isolation |
The read-oriented session manager exposes identity/cwd/header/leaf/entry/branch/tree/label/usage queries. It also includes artifact/blob helpers such as allocateArtifactPath, saveArtifact, getArtifactPath, putBlob and putBlobSync.
“Readonly” here does not mean every helper is side-effect-free: artifact/blob helpers can store data. It means extensions are not handed the journal’s general navigation/mutation API.
Use:
getBranch()for branch-derived state;getEntries()for deliberately whole-journal inspection;getEntry()andgetTree()for stable navigation targets.
Do not mutate returned session records in place.
ExtensionCommandContext
Commands inherit the general context and additionally expose:
getContextUsage;waitForIdle;newSession;branch;navigateTree;switchSession;reload;compact.
The duplicated usage/compaction members remain the same public concepts. The navigation methods are command-only.
The supplied ACP shutdown action is inert. Other hosts request deferred graceful shutdown. Do not build essential durable cleanup around an assumption that ctx.shutdown() terminates every embedding.
Tool metadata and provenance
ToolInfo contains:
name;description;parameters;- optional
promptGuidelines; sourceInfo.
SourceInfo contains:
path;source, such as builtin, SDK, MCP or extension;scope: user, project or temporary;origin: package or top-level;- optional
baseDir.
This metadata answers “where did the tool come from?” It is not an authorization certificate.
ToolRenderResultOptions contains expanded, isPartial, spinnerFrame.
ToolSessionEvent contains reason and previousSessionFile.
ToolShellEnvironmentContext contains command, cwd and env.
All ToolDefinition fields are explained in Tools, interception and native delegation.
UI inventory index
Every supplied ExtensionUIContext member belongs to one of these families:
- Dialogs:
timeoutStartsOnPresentation,select,confirm,input, optionalaskDialog,editor. - Notices and layout:
notify,setStatus,setWorkingMessage,setWidget,setFooter,setHeader,setTitle. - Native components/input:
custom,onTerminalInput. - Composer editing:
setEditorText,pasteToEditor,getEditorText,addAutocompleteProvider,setEditorComponent. - Appearance:
theme,getAllThemes,getTheme,setTheme,getToolsExpanded,setToolsExpanded.
The complete dialog/select/ask/custom option shapes are explained in Review Desk’s UI chapter. Composer shape fields are explained in Editors, themes and composer shapes.
Named-interface coverage index
The supplied inventory’s 27 named interfaces are covered as follows:
| Family | Interfaces |
|---|---|
| Core | ExtensionAPI, ExtensionContext, ExtensionCommandContext, ExtensionModelQuery |
| Tools | ToolDefinition, ToolRenderResultOptions, ToolSessionEvent, ToolShellEnvironmentContext, ToolInfo, SourceInfo |
| Commands | RegisteredCommand |
| UI | ExtensionUIContext, ExtensionUIDialogOptions, ExtensionCustomOptions, ComposerShapeDefinition, ExtensionUISelectOption |
| Rich ask | ExtensionAskDialogOption, ExtensionAskDialogQuestion, ExtensionAskDialogResultItem, ExtensionAskDialogSubmitResult |
| Maintenance | CompactOptions |
| Providers | ProviderConfig, ProviderModelConfig |
| Durable delivery | ExtensionSessionTarget, CaptureSessionTargetOptions, ExtensionDeliveryReceipt, DeliverExtensionMessageOptions |
Reserved shortcuts
The supplied runner rejects these effective extension shortcuts:
ctrl+c, ctrl+d, ctrl+z, ctrl+k, ctrl+p, ctrl+l, ctrl+o, ctrl+t, ctrl+g, ctrl+q, alt+m, shift+tab, shift+ctrl+p, alt+enter, escape, enter.
Other host keybindings can still conflict. Test the actual chord in the actual terminal.
Built-in command names are filtered by the host’s reserved command set. Do not assume a name is available merely because an older example registered it.
Source, snapshot 2026-08-29: packages/coding-agent/src/extensibility/extensions/types.ts, supplied public inventory; loader.ts, ConcreteExtensionAPI; runner.ts; get-commands-handler.ts; packages/coding-agent/src/session/session-manager.ts, ReadonlySessionManager.
Extensions inside those boundaries · Source chapter: extensions/public-feature-reference. Original evidence remains scoped to its recorded snapshot.