OpenFini

Docs / Guides

Vibe Studio

Vibe Studio is OpenFini's AI studio (Alt+5). You describe what you want; an assistant uses OpenFini's own tools to make it: shapes and text in the Vector studio, adjustments in the Pixel studio, pages in the Layout studio, whole websites in the Code studio. There is no separate "AI document": everything the assistant makes is a normal OpenFini document you can keep editing, and every run can be undone in one click.

Off by default. AI features are a master switch under Settings ▸ Artificial intelligence. While it is off, nothing leaves your device and no AI menu items appear. The offline Demo assistant works without it.

Quick tour#

  1. Open Vibe Studio (Alt+5 or the Vibe button in the header).
  2. Pick a model in the composer, or add your own connection under Settings ▸ Artificial intelligence ▸ Models and connections (the composer's model menu has Manage connections…). The built-in Demo (offline) assistant needs no key and shows how the studio works: it follows a small script of real tool calls.
  3. Type what you want and press Enter: "Make a 1080×1350 poster for a jazz night on Friday with a bold headline."
  4. Watch the Canvas panel update as tool cards appear in the chat. Open the result in any studio with one click.
  5. Not right? Undo last AI run (Activity panel, chat footer or the bar that appears after a quick action) restores the document as it was before the request.

Composer extras: attach images and text files (paperclip), attach a picture of the current page (camera), dictate (microphone, where the browser supports speech input), the prompt library (recent prompts, saved prompts, templates per studio), the per-chat Tools menu (switch tool groups off for this chat only), the model pill, the approval mode and the thinking effort. The assistant always knows which layers you have selected, so "make this bigger" works.

Start ideas#

The empty chat shows four idea cards from a pool of about 25 (app/src/vibe/ideas.js), grouped by Vector, Pixel, Layout, Code, Office and Scene studio plus automation and memory. The studio you came from comes first; More ideas rotates through the whole pool. Clicking a card puts its prompt into the composer so you can edit it before sending. Every idea only uses registered tools (a test checks the tool names).

Layout#

  • Left: chats. Center: the conversation and the composer. Right: only two panels, Canvas and Activity.
  • Models and connections, Tools and MCP, Skills, Knowledge, Memory moved to Settings ▸ Artificial intelligence (sub-tabs under Vibe Studio). Deep link for scripts and extensions: app.run("settings.open", { section: "ai", tab: "models" }) (tab: models, tools, web, terminal, files, computer, skills, knowledge, memory, voice, logging). The old commands Show Models and Connections etc. open the same place.

Mentions: @, / and !#

Type a trigger at the start of the message or after a space; a list opens at the caret (fuzzy search, grouped, ↑/↓, Enter/Tab to pick, Esc to close, mouse works too). No list opens while an input method (IME) is composing.

TriggerOffersBecomes
@@selection, layers of the active document (by name), project files of the open website / text project, open documents, attachments of this chat, room membersa chip; sent as [@layer: id name type bounds], [@file: path] plus an excerpt (up to 8 KB per file, 40 KB per message), [@document: …], [@attachment: …], [@member: …]
/built-in commands (/new, /undo, /clear, /stop-all, /create-skill, /skills, /tools), skills (a form asks for their parameters), recent promptscommands run at once; a skill becomes a /skill chip sent as [/skill: name args {…}]
!every tool with its description and parameter hint (!add_shape, !query_layers, …)a !tool chip; sent as [!tool: name] You MUST call the tool … first

Chips sit above the text and are atomic: Backspace at the start of the text removes the last one, each chip has a remove button. Drag a layer from the Canvas outline onto the composer to add it as a chip; dropped files stay attachments and pasted images keep working. The chips travel in a [Vibe context] section at the end of the message (app/src/ui/vibe/mentions.js); the transcript shows them as chips again.

Reviewing what the AI changed (diffs)#

Every mutating tool call is recorded as a change set (before/after snapshots taken under the write lock):

  • Tool cards that changed something show View changes with a compact badge (+12 −3 for text, 2 layers for designs).
  • At the end of a run a Changed in this run card lists the files and layers; Review changes opens the diff drawer: one tab per file (unified or side-by-side, unchanged stretches folded, Revert this file and per change block revert), a Layers tab with the property changes in words (Rectangle “Hero”: fill #ffffff → #0a84ff, x 40 → 80), before/after thumbnails, Select and Revert per layer, and a Document text tab with a paragraph diff for Office documents. Every revert is one undo step; Undo this run is the same as in the Activity panel.
  • Before / after compares the page before the run with the current page on the Canvas (slider).

Limits: change sets live in memory only (chats loaded later have no diffs); files above 400 KB are listed as too large (they can still be reverted); pixel layers and binary files show thumbnails or a note only and are reverted with Undo this run; reordering inside a group is reported only as "moved"; documents with more than 5000 layers are compared on the first 5000.

Canvas panel#

A live preview of the active document: zoom (Fit, 50, 100, 200 %, wheel, +/−/0), pan by dragging or the arrow keys, a page switcher, a layers outline (click to select, eye and lock toggles, H/L keys, A adds the layer to the composer, drag onto the composer), rings around the layers the AI touched in the last run plus Touched by AI chips, the before/after slider, Open in … (split button: Vector, Pixel, Layout, Code, Office), Export… and the document size, pages and layer count. Website projects show the live preview with Desktop / Tablet / Phone widths. Office Suite documents render with each app's own helpers (office/preview.js, loaded on first use): word-processor pages, the grid of a spreadsheet sheet, presentation slides and whiteboard pages; the page menu then lists pages, sheets, slides or board pages, and the preview follows edits live. The preview renders only while the panel is visible (a render skipped while it was hidden runs when it becomes visible), debounced and at most 1800 px on the long side.

Message toolbars#

Answers: copy, retry (newest answer), helpful / not helpful (stored on this device only), and ⋯ with copy as Markdown, retry with another model, read aloud (where the browser has speech synthesis), pin (pinned turns appear in a strip at the top), save to knowledge (adds the answer to the RAG index), share to the room chat (while in a room), collapse, branch chat from here and delete. Your messages: copy, edit and resend (continues from that turn), ⋯ with pin, branch and delete.

Several chats at once#

Chats keep running when you switch to another one or start a new one (pencil button, /new, Ctrl+Alt+N). The chat list shows each chat's state: a spinner while it works, a shield with a count when it waits for your approval or answer, a check when it finished in the background, a warning sign when it failed. The header says "2 running · 1 waiting" and offers Stop all (the global kill switch; also the command Stop All AI Tasks and the Stop button of the AI pill). Right-click a chat to stop only that chat, pin the current model to it, or give it its own approval mode (the composer pills then say "(this chat)").

  • Approvals never steal focus. A background chat that needs approval waits; open it from the list and the approval card is there. Other chats keep going meanwhile.
  • Limit: at most 4 chats run at the same time (Models ▸ Engine). Right-click AI actions count as hidden chats.
  • Same document, several chats: edits are serialized one tool call at a time with a fair queue, so two chats never interleave inside one step; run_plan keeps a whole plan together. The canvas follows the chat that is editing.
  • Undo this run works per chat while that chat's edits are the newest ones in the document. If another chat (or you) edited the document afterwards, Vibe explains why it cannot undo and you undo the newer work first (or use Ctrl+Z step by step). Details: ADR 0008.
  • AI progress pill: in every studio a small pill at the bottom says what the AI is doing ("AI is adding shapes…", "2 AI tasks running", "AI needs your approval"), with a progress bar, Stop and a click that opens the chat. It is hidden while you are in Vibe Studio and only the open chat works.
  • Token usage per chat is shown under each answer and in Models ▸ Engine when the provider reports it.

Sub-agents#

For bigger jobs the assistant can delegate focused parts to sub-agents (spawn_agent): each runs in parallel with its own context window, only the tools it was given (never more than the chat has), and returns a structured result (summary, ids of layers and files it touched). They appear nested under the "Spawn agent" card with live status, a mini transcript of their tool calls and a cancel button, and as "↳ role: tool" entries in the Activity tab. Their approvals show inside their box in the chat. Limits (Models ▸ Engine): 3 running at once per chat (more queue), 12 steps each, 80 steps per request in total, no agents of agents of agents (depth 2), and an optional cheaper Sub-agent model. Stopping the chat stops its agents. Try it offline: "build a brand kit with three agents" with the Demo model.

Chat behavior#

  • Tool cards are one line: icon, title, a one-line summary of the arguments, duration and status (running, done, failed, declined, stopped, waiting for approval). Click a card for formatted, collapsible arguments and result with copy buttons; image results (for example screenshot) show clickable thumbnails. Consecutive calls collapse into one group ("Using 3 tools…" while they run, "Used 4 tools" afterwards); a group opens by itself when a call needs approval or fails. Approvals appear inside the card of the call.
  • Thinking blocks are collapsible and show the elapsed seconds; running titles and the "Thinking…" indicator use a text shimmer that is switched off by Settings ▸ Reduce motion.
  • Auto-scroll follows the newest content while Vibe streams. Scroll up and it stops; a "Jump to latest" pill brings you back (sending a message also resumes following).
  • Message Copy buttons, Retry (sends the last message again as a new message), a Stop button that shows the OpenFini mark while a run is active, and a composer that grows up to 40% of the panel height.

Activity tab#

A live log of the current chat, kept while you switch tabs (it is not saved with the chat and is cleared when you open another chat). Each request is a run with its plan, tool calls (timing, result, files and layers touched), approvals and your decision, errors and retries, token usage when the provider reports it, and the total duration. Filter with All / Changes / Errors; click a file or layer chip to open the file in the Code studio or select the layer; Copy log copies plain text; Clear empties the log (it does not undo anything). Undo this run is offered where a run edited a document. Undo is a stack: only the newest run is undone directly, older runs show Undo back to here, which undoes the newer runs first. Runs that changed nothing, or whose changes were undone already, say so. "Changes" is a name heuristic (tools that only read are excluded).

Connecting a model#

You are never locked in. Under Models, Add a connection and pick a preset, or enter any OpenAI-compatible base URL:

PresetNotes
OpenRouterOne key, hundreds of models. Sign in with OpenRouter (web build) creates a key through OAuth with PKCE.
OpenAIAPI key (key page link, Save and test, optional OpenAI-Organization / OpenAI-Project headers in Extra headers). Image generation and editing via the Images API.
OpenAI account (ChatGPT plan, desktop)Sign in with OpenAI: uses your ChatGPT plan instead of an API key through OpenAI's documented preview for open-source apps. Desktop app only; Responses API without images or embeddings. See openai-account-auth.md.
Anthropic (Claude)API key; native Messages API with tool use and extended thinking.
DeepSeek, xAI (Grok), Mistral, Groq, Together AI, Google Gemini (OpenAI-compatible endpoint)API key, OpenAI-compatible.
Ollama (local)No key; runs on your machine. Native API with model capabilities; the desktop app connects without CORS setup, a browser needs OLLAMA_ORIGINS (see Ollama setup).
Ollama Cloud (ollama.com)API key from ollama.com/settings/keys. Direct connection.
LM Studio (local)No key; runs on your machine. The server must allow the app's origin (enable CORS).
OpenCode ZenAPI key from opencode.ai/auth. OpenAI-compatible gateway, see OpenCode.
OpenCode (local server, experimental)Your own opencode serve. See OpenCode.
CustomAny OpenAI-compatible /v1 server (llama.cpp, vLLM, a company gateway …), or an Anthropic-compatible one: choose the API type and add extra headers (one Name: value per line) in the connection form. If the server has no model list, type the model id in the model picker.

Keys are stored on this device only and are sent only to the base URL you entered. You can protect them with a passphrase (Models ▸ Key protection): they are then encrypted with AES-GCM (key derived with PBKDF2, 250 000 iterations) and must be unlocked once per session.

Honest limits. OpenFini can use a ChatGPT plan only through OpenAI's documented "plan usage" preview (desktop app, see the OpenAI account row above); it never reuses the Codex CLI's credentials or ChatGPT's private endpoints. Claude.ai offers no login for third-party apps, only API keys (billed separately). Tool calling and image input depend on the model; the model list shows what each model reports. Real providers could not be exercised in CI without keys: the engine is tested against recorded protocol fixtures and fake servers.

Ollama setup#

OpenFini talks to Ollama's native API (/api/tags, /api/show, /api/ps, /api/chat, /api/pull), not the /v1 compatibility layer, so it sees every installed model with its capabilities (tools, vision, thinking, context length) and only offers tool use or images to models that support them. Add the connection in Models ▸ Add ▸ Ollama (local).

  • Detect tries http://127.0.0.1:11434, http://localhost:11434 and the address you typed. Test connection says exactly what is wrong: not running, origin refused, plain http blocked on an https page, version too old (tool use needs Ollama 0.3.0), or OK with the version. A pasted /v1 address is accepted and converted.
  • Desktop app (Windows, macOS, Linux): requests go through the app's native side, so CORS and OLLAMA_ORIGINS do not matter. Only your own computer, your local network and ollama.com can be reached this way, and only the /api/ and /v1/ paths (see security). Ollama needs no special setup: start the Ollama app or run ollama serve.
  • Browser (PWA): the page calls Ollama directly, and Ollama only answers origins listed in OLLAMA_ORIGINS. Test connection shows the value for this page and the commands for your system:
    • Windows: quit Ollama from the tray, run setx OLLAMA_ORIGINS "https://your-origin", start Ollama again.
    • macOS: launchctl setenv OLLAMA_ORIGINS "https://your-origin", then restart the Ollama app.
    • Linux: sudo systemctl edit ollama.service, add Environment="OLLAMA_ORIGINS=https://your-origin" under [Service], then sudo systemctl daemon-reload && sudo systemctl restart ollama.
    • An https page cannot call http:// servers on other machines (mixed content); http://localhost works in Chrome, Edge and Firefox but not in Safari. Use the desktop app, or put Ollama behind https.
  • Another machine: set OLLAMA_HOST=0.0.0.0 on the Ollama machine and use http://<its-address>:11434 here.
  • Models: the list shows local models with size, parameters, quantization and capabilities, marks the ones loaded in memory, and has a Pull field with progress for downloading by name. Chat requests use the model's context length (at most 32768 tokens, to keep memory use sane) instead of Ollama's 4096 default.
  • Ollama cloud: after ollama signin, models ending in :cloud or -cloud run through your local Ollama and appear in the Cloud group of the same connection. For a direct connection without the local app, add Ollama Cloud (ollama.com) with an API key from ollama.com/settings/keys.

Fallback chain (model routing)#

Settings ▸ Artificial intelligence ▸ Models ▸ Fallback chain. The model you pick in the model menu is always the primary. Add fallbacks below it (drag or use the arrows to reorder, switch single targets off, give a target its own first-answer timeout) and turn the chain On. When the primary does not answer because of a rate limit, overload, timeout (no first token within 45 s by default), network error, unavailable model or context-length limit, Vibe retries it (default once, with growing pauses) and then moves to the next target. You see a small notice in the chat ("Switched to Claude Haiku after a timeout."), an entry in the Activity log, and the progress pill says it is switching.

  • What is never hidden: wrong or expired keys (authentication) and invalid requests are shown as errors, not routed around, unless you tick Also fall back on authentication errors.
  • Cut-off answers: if text was already shown, the fallback continues from it; nothing is written twice.
  • Compatibility: targets without tool support are skipped when tools are needed, targets without vision when images are attached, and context-length errors only move to a model with a larger known window.
  • Circuit breaker: after 3 failures in a row a target rests for 60 s and is skipped.
  • Sub-agents, quick actions and background runs use the chain too (switch off with Use the fallback chain for sub-agents…). Per chat: Use fallback chain in this chat in the model menu; a "↪" on the model pill marks an active chain.
  • Presets: Same provider, smaller model, Fast & cheap fallback (another connection), Local model as last resort (Ollama); a preset that needs a missing connection says so.
  • Test route sends a tiny request to every target and shows latency or the error category. Each target shows its recent success rate (counts only, stored on this device; no prompts). After repeated failures with no fallback Vibe suggests adding one.
  • Health check: every connection has a Test button (latency, model count, last error, green/red dot).
  • The assistant can read and change the chain with get_model_route / set_model_route (the latter asks first).

OpenCode#

OpenCode is an open-source AI coding agent with a terminal UI and a client/server design. Verified against the official docs and live requests on 2026-10-27; what OpenFini does with it:

  1. OpenCode Zen (real, recommended). Zen is OpenCode's pay-as-you-go model gateway. Preset OpenCode Zen: base URL https://opencode.ai/zen/v1 (OpenAI-compatible Chat Completions; GET /models returns the public model list), key from https://opencode.ai/auth. Model ids have no vendor prefix (claude-sonnet-5-5, gpt-5.4-mini, glm-5.3-flash …). The docs also list https://opencode.ai/inference/... paths; the same GET /models answers on both. The /models response has no pricing or capability metadata (only id and owned_by), so those come from the preset. Free models "work only through OpenCode, not other clients": requests for them from other clients returned 429 FreeUsageLimitError in our test. Browser limit: GET /models sends Access-Control-Allow-Origin: *, but the CORS preflight (OPTIONS) for POST /zen/v1/chat/completions returned 404 without CORS headers in our check, so a page-origin fetch for chat requests will probably be blocked in the PWA (and in any webview that enforces CORS). The Test button therefore may show a network error even though the key is valid; use a CORS-capable gateway (OpenRouter is one) if this applies to you. Not verified: a real chat request with a paid key.
  2. OpenCode (local server, experimental). Start opencode serve --port 4096 --cors <origin of this app> (flags verified in the docs; default host 127.0.0.1, port 4096; if you set OPENCODE_SERVER_PASSWORD, put the password in the key field, user name opencode). OpenFini uses only documented endpoints: GET /global/health, GET /config/providers, POST /session, POST /session/:id/message (waits for the full answer), POST /session/:id/abort, DELETE /session/:id. Model ids are written providerID/modelID. Honest limits: the answer arrives as one message, not token by token, because the server-sent-event schema is not documented and the adapter does not guess it; OpenCode runs its own tools in its own project, OpenFini's tools and screenshots are not available to it; only the shape of the POST /message request and {info, parts} response is documented, the shape of GET /config/providers is not (parsed leniently; if no models are found, type the id). The adapter is tested against a fake server built from the docs, not against a real OpenCode binary. Not implemented: streaming via GET /event, permission prompts (/session/:id/permissions/:id), session reuse.
  3. Import opencode.json. Connections ▸ Import opencode.json reads a file you choose (opencode.json / .jsonc, comments and trailing commas allowed) and offers to create connections from its provider entries (options.baseURL, model ids and limit.context, safe headers). Built-in provider ids (anthropic, openai, openrouter, google, deepseek, xai, groq, mistral, togetherai, opencode) map to the matching presets. Keys are never read: apiKey, {env:VAR} and {file:path} values and authorization headers are dropped, and ~/.local/share/opencode/auth.json is never touched; you paste the key afterwards. Providers using other SDKs (for example Bedrock) are listed as skipped.

Sources: opencode.ai/docs/server, /docs/sdk, /docs/zen, /docs/providers.

What the assistant can do (100 tools)#

Tools ▸ lists them all; you can switch off any single tool.

  • Documents: new document, document info, get_save_target (which file type Save would write and why), studio switch, undo and redo, pages.
  • Web (off by default, see Web access): web_search, fetch_page, download_image.
  • Layers and vector: list layers, selection, screenshots, shapes, text, paths, SVG import, styles, transforms, grouping, ordering, alignment, boolean operations, duplicate, delete.
  • Image editing (no image generation): edit_pixels (remove background, auto white balance / levels / contrast, color replace, sharpen, denoise, vignette, tilt-shift, upscale), remove_background, select_subject, content_aware_fill (selection or a given rect/ellipse), patch_area (texture from dx/dy away), straighten_horizon (detect only, or level the page).
  • Pixel: effect catalog, pixel layers, adjustment and live filter layers, selections, image generation and image editing with the image model you configure, the image operations crop_image (rectangle or ratio, optional straighten angle), resize_image (with resampling), rotate_image, transform_layer_3d (3D tilt X/Y/Z with perspective distance, skew, corner pin or warp-grid points; the layer or only the selected pixels, one undo step) and trim_edges (transparent or solid margins, crop to selection, reveal all), plus the read-only get_histogram (statistics, 64-bin data and a plain-language assessment) and auto_correct_suggestion (ready-made Levels / Curves / Exposure parameters); see the Histogram guide.
  • Git and publishing: git_init, git_status, git_diff, git_log, git_commit, git_branch, git_checkout, git_restore, git_push, git_pull, list_publish_targets, add_publish_target, preflight_site, publish_site (pushes and publishing ask for approval; tokens are never shared with the assistant; see git-and-publishing.md).
  • Frameworks, libraries and documents: list_templates, list_libraries, search_packages and add_library (network, ask first), render_markdown, convert_latex_preview, create_markdown_document.
  • Code and websites: create a website from a template, read, write, edit, rename and delete files, page outline, element inspection and insertion, class-based style edits with breakpoints, page meta, problem check. View controls: set_viewport (pixel-exact width/height or a device preset), get_viewport (size, active breakpoint, markers; read-only), measure_element (box model in px, mm, cm, in, pt, rem, em or %; read-only) and set_code_layout (code left, right, above or below the preview). The assistant can also look at and try out the rendered page: preview_query (elements by CSS selector with text, position, visibility, attributes, loaded state of images and computed CSS values), preview_state (title, viewport and page size, sideways overflow with the elements that cause it, broken images, counts, focused element, recent console output) and preview_interact (click, type, check, press, submit, hover, scroll and wait steps, then the console output they caused, the page state and the elements matching expect). They talk to the probe inside the sandboxed preview frame (ui/code/probe.js): it never evaluates code, replies are cut down to plain, size-limited JSON, and page content is treated as untrusted data. Project links switch the preview page; external links and real form submissions are not followed. A picture of the preview is not available (the frame is sandboxed), so these tools report structure and computed values instead. format_file formats a file (or a line range) with the built-in HTML, CSS, JavaScript, JSON and Markdown formatters without changing what renders; get_viewport also reports the layout width and scrollbar width.
  • System and files: get_platform_info (OS, desktop or browser, version, which file types OpenFini opens and how to make it the default) and list_recent_files, both read-only.
  • Customization: get_settings, set_setting, list_shortcuts, set_shortcut (approval), export_profile (settings and shortcuts only, never secrets; see customization.md).
  • Appearance and help: list_themes, set_theme (theme, mode and accent of the interface), start_tour and list_commands (every command that can run now, with its shortcut; the assistant can tell you where things are but cannot run commands itself). The built-in skill help-me-use-openfini ties them together.
  • Diagnostics and security: get_app_logs (redacted, filterable), get_diagnostics (environment and grouped problems) and get_security_status and run_doctor (the Doctor's findings, doctor.md), all read-only; the assistant should call them only when you ask about errors or your setup (see troubleshooting, security). Offline mode blocks provider and MCP requests.
  • File formats: list_supported_formats (verdict and best conversion route per format, see file-format-research.md), import_palette_from_text (GPL text or hex colors into the swatches) and export_palette (swatches as GPL text).
  • Export: list_export_options (formats, the options that apply with their values and ranges, presets, planned files; read only) and export_document (any format and option of the Export dialog, or a preset; approval and save dialog). See export.md.
  • Imported documents: get_import_report (what an import kept, flattened or dropped), list_pdf_pages, describe_document_pages and extract_pdf_text (page text in reading order, for summarizing or translating a PDF). The assistant has no file access: attach a PDF, AI, PSD, IDML or Sketch file in the composer; the assistant opens it with open_attachment (or click Open as document on the chip). See pdf-import.md.
  • Tables and charts: add_table, edit_table, read_table, list_tables, import_csv_to_table, add_chart, edit_chart, read_chart build and edit real table / chart objects (formulas, merges, number formats, sorting, charts linked to a table). The built-in skill report-with-charts assembles a report page. See layout-tables-charts.md.
  • Office suite: office_formats, office_list_documents, office_describe (read-only, kind-aware), office_screenshot (one laid-out document page, sheet, slide or whiteboard page as an image, with the list of pages) and office_new (any registered kind and template); office_export exports any kind. See office-suite.md.
  • Office documents: office_new_document, office_read_document, office_find (read-only), office_insert_blocks (Markdown or typed blocks), office_replace_text, office_set_style, office_apply_format, office_insert_table, office_set_page_setup and office_export (asks first; a save dialog opens) write and format Word-style documents in the Office Studio, one undo step per call. The built-in skill write-business-document covers letters, reports, proposals, memos and resumes. See office-studio.md.
  • Extensions: list installed extensions, run an extension command, install an extension from a URL (you confirm its permissions), and write a small local extension from a description (create_extension). Tools that extensions add appear as ext_<id>_<tool>, always ask for approval and show their origin; see extensions.md.
  • VS Code extensions: search_vscode_extensions (Open VSX, asks first), install_vscode_extension (you confirm in the install dialog, which shows its compatibility), list_vscode_extensions and describe_vscode_extension (read-only compatibility report); see vscode-extensions.md.
  • Text and encoding: encode_text, decode_text (pure transforms: HTML entities, JS, CSS, percent, code points) and transform_file_text (apply a named transform to project files; more than one file needs approval).
  • Assistant: knowledge search (RAG), remember, use a skill (with arguments and reference files), save a skill draft (create_skill), ask you a question, update the visible plan, create a tool.
  • Power tools (fewer round trips, more detail): run_plan (an ordered list of tool calls in one turn with {"$ref": "step.path"} references between steps, stop-on-error, one approval listing every step, one undo step), query_layers (selector such as rect[name^="Card"][w>100] or attributes: type, name glob, fill, text, within, intersects, parent; paged with limit/offset and fields), describe_page / describe_selection (plain-language summary plus a compact scene text, about 4-6x smaller than list_layers JSON; pass since to get "unchanged"), apply_to_many (set_style / transform for every match, one undo step), evaluate (sandboxed JavaScript for math, colors and grids; no network; may call read-only tools), screenshot_layers (isolated render, lowRes), compare_screenshots (save, then before/after), grid_layout, distribute_layers, snap_layers, make_component (group + copies with overrides by child name). Error messages include valid values and the nearest tool names.
  • Scripting and checks (ADR 0028): run_script is code mode. The assistant writes a short JavaScript function body; inside, await openfini.<tool_name>(args) runs any tool, so loops, conditions and computed values make hundreds of exact edits in one turn. The script runs in a Web Worker without network, DOM, storage or imports and is stopped at its compute time limit (default 10 s, at most 60 s, 500 tool calls). All document edits fold into one undo step. dryRun runs it, returns the structural diff (layers added, removed, changed fields) and reverts everything; it covers layer, table, chart and layout tools. Tools that ask you on every call (web, local files, terminal, publishing, memory) and nested scripts are refused inside a script. find_tools searches the tool set and prints TypeScript-like signatures. checkpoint saves a named state (structure plus a render of the active page), lists them and diffs against one; restore_checkpoint undoes back to it (asks first; redo brings the edits back). visual_diff compares a checkpoint's render with the page now and returns the percent changed, the changed regions in page px and an outlined image. measure_layers returns bounds, pairwise gaps, overlaps, shared edges, equal spacing and the WCAG contrast of text against its backdrop. find_replace replaces text (plain or regular expression, formatting kept), solid colors (fill, stroke, text) and font families across a page or the whole document in one undo step, with a dry run. Checkpoints live in the chat and rely on the undo history.
  • Compact tool list (Settings ▸ Artificial intelligence ▸ Models ▸ Engine, off by default): every request normally carries the definition of every tool. With the compact list, only the core groups (Documents, Assistant, Scripting and checks, Agents, Attachments, Comments), the groups of what is open (the studio or Office app of the active document), the tools of an active skill and your custom, MCP and extension tools are listed (advertisedTools in vibe/script-lib.js). The assistant finds the others with find_tools and runs them with call_tool. call_tool asks exactly what the called tool would ask, in every approval mode, and offers no "Always allow" of its own. This cuts the tokens sent per request by more than half; the price is one extra step when a tool from another area is needed.
  • Long results: a tool result longer than the limit is cut in the middle as before, but the full text is now kept for the chat (the latest eight) and the cut result ends with its id. read_result returns the next part by offset or jumps to a search text, so the assistant does not have to run the tool again.
  • Design checks and assets (no image model, pure logic in vibe/design-lib.js): lint_design checks a page or the document for low text contrast (WCAG 4.5:1, large text 3:1), tiny or empty text, layers outside the page, off-grid positions (when a grid is given), edges that miss each other by a pixel or two, almost-equal gaps, overlapping text, images without alt text, near-duplicate colors and too many fonts or sizes. Every issue names its layers and most carry a fix as a tool call; fix_design_issues applies them in one undo step (with a dry run) and reports what remains. generate_asset places procedural vectors as editable paths: dots, grid, stripes, checker, waves, triangles, crosses, confetti, blob, wave divider, sunburst, rings, a labeled placeholder, a QR code and a Code 128 barcode; a seed makes results repeatable and every shape stays inside its box. make_palette returns a harmony and a 50-900 scale with the readable text color and contrast for each color; extract_palette lists the colors a page uses (from layers, or sampled from the render). type_scale and column_grid compute modular font sizes and column positions. list_merge_fields and data_merge fill <<Field Name>> placeholders from records or CSV text, one copy of the template page per record, one undo step.
  • Agents: spawn_agent, wait_agent, list_agents, cancel_agent (see Sub-agents).
  • Attachments: list_attachments and open_attachment open a file you attached in this chat as a new document through the same importers as File ▸ Open (images in Pixel, SVG in Vector, PDF and Illustrator in Layout with the default import options, PSD, IDML, Sketch, text and code files in Code). Opening asks for approval only in Careful mode. Attachments are kept in memory for the session; after a restart attach the file again.
  • Comments (tools/comments.js, work without a room, saved in the document): list_comments and get_comment_context (read-only; every thread comes with the exact target: layer id/name/type/bounds, code file + lines + excerpt, website element + HTML, Office paragraph + quote; the context adds a cropped screenshot or surrounding lines), add_comment, reply_comment, resolve_comment. Replies are signed "Vibe (AI)". Add/reply ask only while the user is in a room; resolve asks in Careful mode like any write. The built-in skill address-comments goes through the open comments, makes the precise edit, replies and resolves. In the composer @comments adds the open comments as context; the thread popover and the Comments panel have Resolve with AI (vibe/quick-actions.js, needs AI enabled). The Demo provider replies honestly that it cannot decide the edit.
  • Collaboration: get_collab_status, read_chat, list_versions, get_sharing_status, list_shared_documents (read-only), save_version, and, with approval because they reach other people, post_chat_message and share_document. Never exposes invite codes or keys. See collaboration.md.

Inside Vibe Studio the assistant does not switch studios behind your back; the Canvas panel shows the document and offers buttons to open it in a studio. (Website editing builds the Code studio's editor in the background.)

Office semantic and cross-app tools#

Address a text document by meaning instead of block numbers, and move content between Office apps (vibe/tools/office-semantic.js, pure logic in engine/office/sections.js). Each description ends with a Watch out note: the mistakes models typically make with the tool and which describe/read tool verifies the result.

ToolWhat it does
office_list_sectionsHeadings with level, block range and word count; tables with captions (read-only)
office_read_sectionOne section by heading text (exact, case and numbering ignored, or a unique part)
office_rewrite_sectionReplaces a section's body with Markdown; the heading, the body style and paragraph formatting stay; keepSubsections
office_move_sectionMoves a section with its subsections before/after another; levelChange promotes or demotes
office_check_accessibilityTitle, heading order, empty headings, alt text, table headers, link text, contrast, long paragraphs
office_tables_to_sheetDocument tables into a new spreadsheet (one sheet per table, typed values, bold header)
office_sheet_to_documentA range of an open spreadsheet as a formatted table in the active document (a snapshot)
office_document_to_slidesThe outline as a new deck: Title slide, one slide per heading, bullets from lists and first sentences
office_board_to_documentA whiteboard as a new text document: a heading per page and frame, notes as bullets, connectors as "A → B"
slides_insert_chartA chart on a slide from a range of an open spreadsheet (a snapshot; slides_refresh_charts re-reads it)

| sheet_add_rule | Conditional formatting: data bars, color scale, comparisons | | sheet_format_table, sheet_define_name, sheet_set_validation, sheet_paste_special, sheet_group, sheet_page_setup, sheet_pivot, sheet_refresh_pivots, sheet_add_sparkline | Spreadsheet depth: table styles with a total row, defined names, drop-down and number validation, paste special, row/column groups, page setup, pivot-lite, sparklines (office-sheet.md) | | sheet_chart_data | Categories and series of a range of any open spreadsheet, for charts and tables in other apps (read-only) |

Office design and review tools#

Design, tables and review of text documents (vibe/tools/office-design.js, pure logic in engine/office/design.js, user guide: office-studio.md). Every description has a Watch out note; each edit is one undo step.

ToolWhat it does
office_design_infoCurrent theme, table styles, sections, TOC, floating objects, tracked changes; ids of all themes, style sets and table styles (read-only)
office_apply_designTheme (office, classic, modern, elegant, bold, minimal, ocean) and/or style set (default, compact, airy, formal)
office_update_styleUpdate a style to match an example paragraph (direct formatting moves into the style)
office_table_styleGallery style on a table: header row, banded rows, first column, total row
office_table_editSort by a column, total row, distribute or fit columns, set widths, insert or delete rows and columns, header on/off
office_insert_styled_tableA styled table from rows of text in one call, optional total row
office_insert_section_breakSection break with 1-4 columns, continuous or next page
office_insert_text_boxFloating text box anchored to a paragraph: plain text or formatted paragraphs (bold, italic, underline, color, size, alignment), wrap left, right or in line, fill, border
office_insert_tocGenerated table of contents after the title
office_track_changesTrack changes on/off, list, accept or reject (all, by id, author or kind: insertions, deletions, format and paragraph changes, splits, joins). While tracking is on, every Vibe edit of a text document is tracked, authored Vibe (AI)

Scene Studio tools#

Three groups (46 tools) edit and understand video in the Scene Studio; each write call is one undo step. Details, algorithms and limits: scene-studio.md.

GroupTools
Scenescene_describe, scene_catalog, scene_new, scene_set_format, scene_track, scene_import_media, scene_place_media, scene_add_layer, scene_move_clips, scene_trim_clip, scene_split, scene_delete_clips, scene_set_speed, scene_update_clips, scene_transition, scene_keyframes, scene_set_easing, scene_precompose, scene_effect, scene_audio, scene_markers, scene_cut_ranges, scene_captions, scene_captions_export, scene_render_frame, scene_show, scene_export
Scene understandingscene_transcribe (batch speech engine of the engine registry; asks before an online one), scene_set_transcript, scene_transcript, scene_detect_shots, scene_analyze_audio, scene_sample_frames, scene_index_note, scene_search
Scene automationscene_cut_transcript, scene_remove_silences, scene_remove_fillers, scene_auto_captions, scene_highlight_reel, scene_reframe, scene_animate_clip, scene_title, scene_lower_third, scene_slideshow, scene_beat_cuts

scene_import_media from a URL needs web access and asks per domain; scene_export always asks and opens a save dialog. Skills: rough-cut-from-transcript, video-captions, social-cutdowns, title-animation, lower-third, photo-slideshow, beat-synced-edit, video-summary.

Proto Studio tools#

Group Proto (20 tools, Labs) designs interfaces in the Proto Studio; each write call is one undo step validated by the design engine. Details: proto-studio.md.

GroupTools
Protoproto_describe, proto_get_node, proto_search, proto_screenshot, proto_new, proto_create, proto_update, proto_move, proto_delete, proto_duplicate, proto_component, proto_variables, proto_styles, proto_tokens, proto_lint, proto_fix, proto_responsive, proto_content, proto_rename, proto_from_screenshot, proto_design_system, proto_app, proto_restyle, proto_responsive_variant, proto_extract_components, proto_a11y, proto_copy, proto_critique, proto_template

Skills (pack proto): proto-screen-from-brief, proto-screen-from-screenshot, proto-component-variants, proto-tokens-dark-mode, proto-handoff, proto-design-audit; studio guide studio-guide-proto.

Permissions#

ModeBehavior
CarefulAsks before every tool that changes something.
Balanced (default)Reads and edits your document freely; asks before risky actions (deleting files, overwriting, running custom tools or MCP tools).
AutoRuns everything except custom tools it just wrote and MCP tools, which still ask.

Any tool can be set to Always allow. The approval card shows the exact arguments. Whatever the mode, the assistant only touches OpenFini documents: it has no access to your files, shell or network except through the connections and MCP servers you add.

More tools (scrape, crawl, APIs, knowledge base, utilities, terminal)#

  • Web (with web access on): scrape_page extracts text, CSS-selector matches (tag, #id, .class, [attr=value], descendant and > combinators), tables as Markdown, links or metadata; crawl_site reads up to 25 pages of one site obeying robots.txt and Crawl-delay with at least 1 s between requests (approved every time, optional addToKnowledge); http_request calls JSON APIs on the API domains allowlist (approved every time).
  • Knowledge base: rag_add_source (a URL, the open project's files, an opened folder on disk in the desktop app, or text; caps: 300 files, 2 MiB per file, 20 MiB and 60 s per call; progress in the tool card), rag_search (numbered passages with source and line, cite as [n] source:line), rag_list, rag_remove. Retrieval is hybrid when an embedding model is selected, otherwise BM25 on this device with no network.
  • Utilities: calculate (no eval), convert_units, date_calc, run_code (JavaScript in a sandboxed worker, no network, time limit), clipboard_read (asks every time). Code: file_search and apply_patch (unified diff). PDFs: extract_pdf_text on an imported PDF.
  • Terminal (desktop app, off by default): run_command runs one allow-listed program with an argv (no shell) in an opened folder, approved per call, with a live output panel and Stop. Policy and limits: Settings ▸ Artificial intelligence ▸ Terminal and docs/security.md. There is no interactive terminal panel in the Code studio.
  • Computer use (desktop app on Windows and macOS, off by default): computer (screenshot, zoom, mouse, keyboard in other apps) and computer_info. Every session is allowed in a system dialog, input actions are approved one by one, and an always-on-top bar with Stop stays visible. See vibe-computer-use.md.

Web access#

Off by default. Settings ▸ Artificial intelligence ▸ Web access switches on three tools (group Web): web_search (web or openly licensed images), fetch_page (readable text as markdown) and download_image (places a PNG, JPEG, GIF or WebP as a layer, or shows it in the chat). The find-images skill describes the workflow.

  • Approval per domain. Each call shows the domain and the exact arguments: Allow, Always allow this domain (adds it to the allowlist in settings) or Decline. These tools ask in every permission mode, also in Auto, and the per-tool Always allow does not apply to them. Domains on the blocklist are refused even when approved.
  • Search backends. Web search: Wikipedia (default, no key, articles only), DuckDuckGo (no key, desktop app; falls back to Wikipedia in the browser), SearXNG (your own instance, no key; it must enable the json format), Brave Search (API key), Tavily (API key). Image search always uses Openverse (no key needed, rate limited) with Wikimedia Commons as fallback; results include license, creator and source page. Keys are stored on this device and sent only to the search service.
  • Licenses. download_image records source URL, license, creator and title in the asset (doc.assets[id].source) and on the layer (source) when known, and tells you the credit line. Without a license the result says so.
  • Limits. Page size (default 2 MiB), image size (10 MiB), image pixels (40 MP) and timeout (15 s) are adjustable.
  • Browser versus desktop. In the desktop app plain GETs go through a native command (web_get) that reads pages without CORS headers, resolves host names itself and refuses private addresses there too, and returns redirects for the app to check; see vibe-files.md. In the browser requests use fetch: sites without CORS headers cannot be read (the error says so); Wikipedia, Openverse and Commons allow it. A SearXNG instance must send Access-Control-Allow-Origin there.
  • Untrusted content. Results are wrapped in <untrusted_web_content> with a reminder that they are data, not instructions.

Language#

Replies follow the interface language (Settings ▸ General ▸ Language) unless you write in another language. The built-in skills, tool descriptions and system instructions stay English: they are instructions to the model, not UI text. See i18n.md.

Skills#

A skill is a Markdown file (SKILL.md style): a name, a description, optional allowed-tools, parameters and instructions. The assistant sees only the catalog and loads a skill when a task matches (the use_skill tool), so skills cost almost no context. 35 are built in, including workflow skills for design systems, responsive sites from a brief, photo compositing, icon sets, presentations, print brochures, social campaign kits, mobile UI mockups, data reports, code refactoring, SEO, accessibility fixes, localization, brands from a logo, CSS animation and multi-agent-project-lead (how to split work across sub-agents), plus eleven Office skills (write-report, polish-document, build-budget-sheet, make-pitch-deck, clean-data, brainstorm-to-board, accessibility-check-document, translate-document-keeping-format, meeting-notes, analyze-sheet-data, design-document), each with a Watch out and a Verify section.

  • /skill-name starts a skill; skills with parameters open a small form. A chip suggests a matching skill while you type.
  • Skills can require other skills, load reference files on demand, be limited to studios, and (with enforce-tools: true) restrict the assistant to their tools while active.
  • Skills panel: search, tag filters, source badges (built-in, yours, extension, draft), usage stats, an editor with live preview and validation, Customize for built-ins, import/export of .skill.md and .skillpack bundles, Test with the Demo model, and Create from this chat (/create-skill), which saves a draft for you to review.

Format reference and authoring guide with examples: vibe-skills.md.

Knowledge (RAG)#

Add brand guides, copy decks, specs or notes under Knowledge. Files are chunked and indexed on this device with BM25; if you select an embedding model, dense vectors are added and results are blended. Your open website project is indexed automatically. The assistant searches with search_knowledge; you can test a query yourself in the panel.

Local files#

Off by default, desktop app only. Settings ▸ Artificial intelligence ▸ Local files grants single folders (read only or read and write) through the native folder picker; local_list_folders, local_list_files, local_read_file and local_write_file work only inside them, ask on every call and are recorded in an audit log. Paths are checked by the desktop app itself (no .. or symbolic-link escape). Details: vibe-files.md.

Voice#

Settings ▸ Artificial intelligence ▸ Voice: Vibe can read its replies aloud with on-device system voices and an expressive sentence-by-sentence reading; the microphone uses the system recognizer (Chromium-based browsers send the audio to an online service) or can be switched off; voice chat in the composer listens, sends when you stop talking and reads the answer. Local speech models (whisper.cpp) can be downloaded and verified, but their runtime is not bundled yet. Details and status: vibe-voice.md.

Memory, context window and sub-threads#

Vibe remembers preferences, facts and project context across chats (remember, recall_memory, forget_memory) and sends only the memories relevant to each request. Manage them under Settings ▸ Artificial intelligence ▸ Memory (global off switch, switch per memory, pin, edit, delete, export and import). The composer's Context window button shows what a request sends, with estimated tokens, and lets you drop tool results, attachments, turns or memories for this chat. Right-click a message ▸ Start a sub-thread here opens a side conversation linked to its main thread. Details: vibe-memory.md.

MCP servers and your own tools#

  • MCP: add the URL of an MCP server that speaks Streamable HTTP (Tools ▸ MCP servers). Its tools appear with an mcp_ prefix and always ask first in Balanced mode. Authentication: a bearer token you paste, or Sign in (OAuth per the MCP authorization spec: discovery, dynamic registration, PKCE, automatic refresh; desktop uses a one-shot loopback callback, the web build a redirect back to the app). Sign out revokes and removes the stored tokens. Servers that do not advertise PKCE S256 are refused.

  • stdio servers (most community servers) are programs, not URLs. Use the bundled gateway to expose one on 127.0.0.1:

    npm run mcp:gateway -- --port 3939 -- npx -y @modelcontextprotocol/server-filesystem ~/Documents
    

    then add http://127.0.0.1:3939/mcp. The gateway only listens on localhost, accepts browser requests only from localhost, the hosted app and the desktop app (add more with --origin), and can require --token.

  • Your own tools: describe a function ("a tool that makes N social-media sizes from the selected layer") and the assistant can write it with create_tool, or write one yourself under Tools ▸ New tool. Custom tools are small JavaScript functions that run in a sandboxed frame without network or DOM access to the app; they call OpenFini only through openfini.call(name, args), which passes through the same approvals. They ask before each run.

Right-click AI#

With AI enabled, context menus get an AI submenu:

  • Canvas (selection aware): describe, restyle, create variations, tidy up layout, name layers, rewrite text, fix spelling and grammar, translate, generate an image here, edit with AI (Pixel), auto-enhance a photo, check contrast and accessibility.
  • Code editor (selected code): explain, fix problems, refactor, add comments, generate code here.
  • Website elements: improve copy, make responsive, restyle, add hover and focus states.
  • Office: the word processor (improve writing, fix grammar, summarize, translate, change tone), the spreadsheet (explain, clean up data, add a chart for the selected range), the presentation (explain, improve this slide) and the whiteboard (explain, tidy up).
  • Scene Studio (viewer and timeline; playhead and selected clips): describe this moment, animate the selection, add captions, remove silences and filler words, make a vertical version, summarize the video.
  • Custom instruction… in every AI submenu: a prompt field, the recent custom instructions (kept on this device, 12 at most) and what to attach: the selection, the whole document, a screenshot of the selection, or "only answer".

Every action opens a Vibe chat (Settings ▸ Artificial intelligence ▸ Logging and actions ▸ Right-click AI actions open: a new Vibe chat (default), the last right-click chat while it is idle, or no chat, the old inline behavior with the answer in a dialog). The chat:

  • is titled from the action and the target (“Rewrite · Headline”, “Explain · Budget!A2:C9”, “Fix problems · app.js:12-30”) and is kept in the chat list, so you can follow up there;
  • carries the context: document name, type and studio, the target (layer ids, text, cell range, code lines, website element, slide or board elements, at most 50 ids) and the instruction, in one [Vibe context] block limited to 12,000 characters; a small PNG of the selected layers is attached when screenshots may be sent;
  • remembers its target (chat.target): Go to selection above the conversation switches back to the document and selects the layers, code lines, cells, slide or board elements again;
  • runs in the background: the AI progress pill shows it (Stop cancels it), approvals and questions are asked right away in a dialog while you are not in Vibe Studio, and the bar afterwards offers Undo (one step for the whole run) and Open chat. "Answer" actions show the answer with Continue in chat.

The same rules apply as for every chat: AI must be on, a model connected, offline mode blocks remote providers, the chat's model can be changed in its composer, and the per-chat approval mode is respected.

AI log#

Every request is recorded in a separate, rotating "ai" log channel (model, routing and fallbacks, a hash of the system prompt, skills available and loaded, every tool call with name, argument names, duration, status and result size, errors, retries, approvals and token usage). Prompts, tool arguments, results and replies are only recorded with Verbose on. Settings ▸ Artificial intelligence ▸ Logging and actions shows the runs and has Export AI log for the developer (also in the Troubleshooting dialog). Format: ai-logging.md.

Privacy and safety#

  • Nothing is sent anywhere unless AI features are on and you chose a non-Demo model. Your prompt, attached files, screenshots of your pages (switch off Send screenshots in Tools settings), the memories picked for the request and tool results go to the provider you chose, under that provider's terms.
  • Chats, memory, skills, knowledge and keys are stored locally (IndexedDB / the app's storage). Settings ▸ Artificial intelligence ▸ Delete all AI data removes them.
  • Text that comes from outside (web pages in tool results, MCP responses, attached files, text on a canvas) is data, not instructions. The system prompt says so, and risky actions need your approval, but no model is immune to prompt injection: keep Balanced or Careful mode when working with content you do not trust.
  • The desktop app's Content-Security-Policy allows connect-src to https: (provider APIs) and localhost (local models and the MCP gateway). See SECURITY.md.

Architecture#

PartLocation
Pure AI runtime (providers, agent loop, MCP, RAG, skills, vault)app/src/ai/ — see ai-engine.md
OpenFini toolsapp/src/vibe/tools/ (power tools power.js, code mode and checks script.js with pure logic in vibe/script-lib.js, design checks and assets design-assist.js with vibe/design-lib.js, agents agents.js, attachments attachments.js)
Hub (many chats, shared services, write lock), chat sessionapp/src/vibe/hub.js, app/src/vibe/session.js
Write lock, run undo, sub-agent engine, query/ref/scene helpers (pure)app/src/vibe/locks.js, run-undo.js, agents.js, query.js
Store, custom tools, quick actions, OAuth returnapp/src/vibe/
Studio UIapp/src/ui/vibe/ (chat list chat-list.js, skills panel-skills.js, settings host settings-ai.js), app/styles/vibe.css, app/styles/vibe-engine.css, app/styles/vibe-ui.css
Mentions and composerpure mentions.js (trigger detection, fuzzy ranking, context blocks), UI composer-mentions.js, toolbars message-actions.js
Change sets and diffspure changes.js (snapshots, layer/file/paragraph diffs, per-hunk revert), recorder change-recorder.js (hooked via hub.changeProbe in VibeSession#wrap), drawer diff-view.js
Canvas panelpanel-canvas.js (preview, outline, rings, before/after)
AI progress pillapp/src/ui/ai-pill.js, wording in app/src/ui/vibe/activity-label.js
Model routingpure app/src/ai/routing.js; glue vibe/routing-glue.js, presets vibe/route-presets.js, tools vibe/tools/routing.js, editor ui/vibe/panel-routes.js (ADR 0014)
OpenCodeapp/src/ai/providers/opencode.js (importer + experimental server adapter)
MCP gatewayscripts/mcp-gateway.mjs

How it fits together. getVibeHub(app) creates the hub on first use. The workspace binds the UI to hub.view, a SessionView that forwards the events of the active chat (chat, message, event, approval, ask, plan, notice, done, error, status, runs) and replays a running chat when you switch to it. Each VibeSession builds its tools per request and wraps them: skill restriction, then the write lock (mutating calls), document affinity and the history tag { chat, run }. send() runs runAgent with an AgentManager for sub-agents. Design decisions: ADR 0008.

How to extend. New tools: a (app, ctx) => Tool[] module in app/src/vibe/tools/, registered in tools/index.js and listed in TOOL_GROUPS; mark pure reads readOnly: true (they run in parallel and without the lock) and set exclusive: true for reads that must not overlap writes. Session services for tools are on ctx (lookup, policy, allowed, agents, attachments, snapshots, useSkill). New Demo scenarios: planForPrompt in app/src/ai/providers/mock.js.

The UI's only hook into the engine is hub.changeProbe (optional): VibeSession#wrap calls changeProbe.before({ session, id, name, input, doc, run }) after taking the lock and probe.after(app.doc) when a mutating call ends; failures there never fail a tool call.

Testing. tests/ui/vibe-mentions.test.js and tests/ui/vibe-changes.test.js cover the pure composer and diff builders. tests/ai/ (runtime, gateway, skills v2, and a contract test that checks the demo assistant, the skills and the tool groups against the real tool registry) and tests/vibe/ (write lock fairness, tag-based undo, queries, run_plan refs, scene text, sub-agent budgets/depth/tool restriction, and engine tests that run the real hub with the Demo provider against real documents: concurrent chats, background approvals, limits, kill switch, three-agent brand kit, skill arguments and enforcement, attachments).

Edit on GitHub → docs/vibe-studio.md