OMP Workbook

Read the source. Follow the evidence.

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

MembersPractical contractWorked example
loggerFile logging; avoid console output that corrupts TUI/RPC channels and avoid logging secretsLab status; native delegation
typebox, arktype, zodInjected compatible schema authoringSeed Desk; Package Lab
piInjected coding-agent package exports; availability still follows the matching hostSDK-oriented integrations
onSubscribe using the exact supported event name and return shapeEvent reference
registerToolRegister a schema-shaped machine capabilitySeed Desk; Review Desk
registerCommandRegister a human/host slash-command handlerAll principal stories
registerShortcutRegister a nonreserved operator key bindingPhrase-key exercise
registerFlag, getFlagDeclare/read a boolean or string flag; read your own registered nameseed-quiet
setLabelSet the extension’s display label in the supplied concrete implementationLab status
registerMessageRendererRender a named custom message typeReview Desk
registerAssistantThinkingRendererAdd supplemental UI after visible thinking blocksThinking-length exercise
registerComposerShapeRegister a complete composer rendering contractWorkbook Field Dock
registerFileWriteFallback, registerFileDeleteFallbackRegister separate native permission-denied mutation seamsFile fallbacks
registerProvider, unregisterProviderRegister/remove runtime model-provider overridesProviders
eventsShared runtime event bus with on, emit, clearField 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

MembersPractical contract
sendMessageCustom conversation/context message; optional steer/follow-up/next-turn and turn trigger
captureSessionTarget, deliverMessagePersistent owner anchor and deduplicated complete delivery with a receipt
sendUserMessageUser-style prompt/queue; no slash-command dispatch
appendEntryCustom state entry, not model-visible content
execProgram/argv execution with cwd, timeout and cancellation
getActiveTools, getAllTools, setActiveToolsEnabled-set inspection, full registry metadata and asynchronous selection
getCommandsDynamic command metadata, not a universal list of built-ins
setModelCredential-aware model selection
getThinkingLevel, setThinkingLevelEffective thinking-level control
getServiceTiers, setServiceTierDetached per-family tier snapshot and subsequent-request override
getSessionName, setSessionNameRead/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

MembersWhat to remember
ui, mode, hasUIMode and actual method support matter; hasUI is not “all TUI methods work”
cwdCurrent at context creation; do not retain it as a permanent workspace identity
sessionManagerRead-oriented session/journal access
modelRegistryHost registry and credential-resolution access; prefer models for selection queries
model, modelsCurrent/request-specific model and read-only query facade
localProtocolOptionsCalling-session local:// mapping for compatible bridges
getContextUsageEstimated context tokens/window/percentage; can be undefined
getAsyncJobSnapshotRead-only owner-scoped job state; can be null
isIdle, hasPendingMessagesSnapshot predicates, not locks
abortRequest cancellation of the current agent operation
shutdownRequest host shutdown; host-specific and not an immediate process.exit guarantee
getSystemPromptEffective prompt blocks; treat returned content as sensitive
compactRequest host maintenance at a safe boundary
memoryOptional status/search/save runtime
setInterval, setTimeout, clearTimerManaged timer lifecycle
invokeToolOptional same-name native built-in delegation
isProjectTrustedCompatibility 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() and getTree() 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, optional askDialog, 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:

FamilyInterfaces
CoreExtensionAPI, ExtensionContext, ExtensionCommandContext, ExtensionModelQuery
ToolsToolDefinition, ToolRenderResultOptions, ToolSessionEvent, ToolShellEnvironmentContext, ToolInfo, SourceInfo
CommandsRegisteredCommand
UIExtensionUIContext, ExtensionUIDialogOptions, ExtensionCustomOptions, ComposerShapeDefinition, ExtensionUISelectOption
Rich askExtensionAskDialogOption, ExtensionAskDialogQuestion, ExtensionAskDialogResultItem, ExtensionAskDialogSubmitResult
MaintenanceCompactOptions
ProvidersProviderConfig, ProviderModelConfig
Durable deliveryExtensionSessionTarget, 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.

Read this chapter as Markdown

Your lesson ticks

A self-reported reading checklist, not proof of real OMP behavior. Only these ticks are saved in this browser. Reading a milestone does not resume, fork, reset or export a session.

Chapters I have worked through
Start here 1
Sessions, resets, and reviewable history 19
Memory and reusable knowledge 14
Tangent work and live control 17
Tool permissions and approvals 15
Extensions inside those boundaries 23
Connections and next steps 8
0 of 97 checked

Checklist saving needs JavaScript and available browser storage.