Official

tabs

The tabbed detail pane beside the chat: files to edit and diffs (JavaScript UI plugin).

The app opens the listing; nothing installs until an agent in your Plugins workspace has read the files and you enable the plugin. In a terminal: dvg install divergence/tabs@0.2.6

Permissions in 0.2.6

  • Read files fs.readMediumReads files in the listed places.Open workspace files in tabsPlaces: the open workspace
  • Write files fs.writeMediumCreates, changes and deletes files in the listed places.Save the files edited in tabsPlaces: the open workspace
  • Read chats chats.readMediumReads your transcripts and chat lists.Reload the open files when an agent finishes a turn, and find the folders of the workspaces whose files the tabs follow
  • Read git status and diffs git.readLowReads git status and diffs.Read a file's changes for a diff tab dragged from Source Control or brought back after a restart

Files

contract.ts2 KB
// The divergence/tabs service: other plugins open and close files, diffs,
// terminals and diagrams, which are this plugin's tab kinds and show in the
// side split or a task's pane (specs/tasks-and-splits/05), and follow which
// one is visible. Zod is the contract; the host
// derives JSON Schema from it and checks every call, result and event.
import * as z from "zod";
import { defineService } from "divergence/services";

export const TabKind = z.enum(["file", "diff", "terminal", "diagram"]);

// Which tab: tabs are known by kind, path (a terminal's path is its id) and
// workspace, since two workspaces can hold the same relative path. A ref
// without a workspace names the first tab of that kind and path.
export const TabRef = z.object({ kind: TabKind, path: z.string(), workspaceId: z.string().optional() });

export const OpenTab = z.object({
  kind: TabKind,
  workspaceId: z.string(),
  path: z.string(),
  // A diff tab shows this unified diff; a diagram tab draws this source of
  // a markdown fence of `language`.
  diff: z.string().optional(),
  // A diff of the working tree (false) or of the index (true): the tab then
  // reads it again whenever the file or the index changes. Without it the
  // diff is a snapshot, as a turn's diff is.
  staged: z.boolean().optional(),
  source: z.string().optional(),
  language: z.string().optional(),
  title: z.string().optional(),
  icon: z.string().optional(),
  // A file tab's editor takes the keyboard once it shows: a file the
  // user picked from a list.
  focus: z.boolean().optional(),
  // The chat it comes from (a diff from a tool call, a diagram from a
  // reply): the tab then belongs to that chat's task.
  chatId: z.string().optional(),
});

export const Tabs = defineService("divergence/tabs", "2.1.0", {
  methods: {
    open: { params: OpenTab, result: z.object({ id: z.string() }) },
    close: { params: TabRef, result: z.null() },
    active: { params: z.object({}), result: TabRef.nullable() },
  },
  events: {
    activeChanged: TabRef.nullable(),
  },
});
export type Tabs = typeof Tabs;

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.7latestNov 21, 2026>=5 <635.3 KB4 permissionsListed
0.2.6Nov 11, 2026>=5 <635 KB4 permissionsListed
0.2.5Nov 11, 2026>=5 <634.9 KB4 permissionsListed
0.2.4Nov 9, 2026>=5 <630 KB4 permissionsListed
0.2.3Oct 27, 2026>=2 <422 KB4 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.