Official

settings

Built-in settings UI (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/settings@0.2.4

Permissions in 0.2.4

  • Manage plugins plugins.manageOfficial onlyReloads and enables plugins. Only official plugins can have it.List, enable, disable and reload plugins, install updates, and quit to finish an update
  • Change app settings settings.writeHighChanges the app settings.Change the settings and the theme
  • Manage agents agents.manageHighEnables, disables and signs in agents, and changes their settings.Turn agents on and off, sign in to them and update them
  • Control chats chats.controlHighCreates chats, sends prompts and cancels runs.Import an agent's own sessions as chats, add project folders, and open the first chat and the changes saved in the first-run guide
  • Read chats chats.readMediumReads your transcripts and chat lists.List the workspaces an agent's sessions can be imported into, and hold an agent's update until its chats stop running
  • Read app settings settings.readLowReads the app settings.Show the settings, and the tools and rules of every plugin
  • Show panels ui.slotsAlways grantedShows views in the listed parts of the window.Draw settings, its list of sections in the sidebar's place, and the first-run guideSlots: centerleft

Files

agents-view.test.ts3.3 KB
// The Agents section's process pool pickers: they show the host's defaults
// until the user picks, and save through the settings update.
import assert from "node:assert/strict";
import test from "node:test";
import * as Effect from "effect/Effect";
import type { EffectViewContext } from "divergence/effect";
import type { SettingsPage } from "./controller.ts";
import { renderAgentChoices, renderAgents } from "./views/agents.tsx";

type Node = { id?: string; value?: string; options?: { value: string; label: string }[]; onChange?: (e: { value: string }) => void; children?: unknown };
const find = (node: unknown, id: string, out: Node[] = []): Node[] => {
  if (!node || typeof node !== "object") return out;
  if (Array.isArray(node)) {
    for (const child of node) find(child, id, out);
    return out;
  }
  const value = node as Node;
  if (value.id === id) out.push(value);
  find(value.children, id, out);
  return out;
};

function render(settings: Record<string, unknown>) {
  const patches: unknown[] = [];
  const actions = {
    state: { agents: [], data: { status: "ready", settings, plugins: [] }, showRegistry: false },
    updateSettings: (patch: unknown) => Effect.sync(() => void patches.push(patch)),
  } as unknown as SettingsPage["Service"];
  const ctx = { run: (effect: Effect.Effect<unknown>) => Effect.runSync(effect), update() {} } as unknown as EffectViewContext<object>;
  return { tree: renderAgents(ctx, actions), patches };
}

test("the process pickers show the host defaults when nothing is saved", () => {
  const { tree } = render({});
  const [limit] = find(tree, "agent-process-limit");
  const [idle] = find(tree, "agent-idle-minutes");
  assert.equal(limit?.value, "20");
  assert.deepEqual(limit?.options?.map((o) => o.value), ["5", "10", "20", "40"]);
  assert.equal(idle?.value, "10");
  assert.deepEqual(idle?.options?.map((o) => o.value), ["5", "10", "30", "60"]);
});

test("a saved value outside the presets stays listed, and a pick is saved as a setting", () => {
  const { tree, patches } = render({ agentProcessLimit: 12, agentIdleMinutes: 30 });
  const [limit] = find(tree, "agent-process-limit");
  assert.equal(limit?.value, "12");
  assert.deepEqual(limit?.options?.map((o) => o.value), ["5", "10", "12", "20", "40"]);
  limit?.onChange?.({ value: "40" });
  find(tree, "agent-idle-minutes")[0]?.onChange?.({ value: "5" });
  assert.deepEqual(patches, [{ agentProcessLimit: 40 }, { agentIdleMinutes: 5 }]);
});

test("agents split on the provider's registry flag", () => {
  const agent = (id: string, registry?: boolean) => ({ id, name: id, enabled: false, ...(registry === undefined ? {} : { registry }) });
  const actions = {
    state: { agents: [agent("codex"), agent("acp:gemini", false), agent("goose", true), agent("acp:old", true)], showRegistry: false },
  } as unknown as SettingsPage["Service"];
  const ctx = { run() {}, update() {} } as unknown as EffectViewContext<object>;
  const tree = renderAgentChoices(ctx, actions);
  assert.equal(find(tree, "agent-codex").length, 1);
  assert.equal(find(tree, "agent-acp:gemini").length, 1, "a provider that says it is not from a registry is listed");
  assert.equal(find(tree, "agent-goose").length, 0);
  assert.equal(find(tree, "agent-acp:old").length, 0);
  const [toggle] = find(tree, "registry-agents") as { label?: string }[];
  assert.equal(toggle?.label, "Show the other 2");
});

Versions

VersionPublishedPlugin APISizePermissionsStatus
0.2.8latestNov 21, 2026>=5 <668.5 KB7 permissionsListed
0.2.7Nov 18, 2026>=5 <668 KB7 permissionsListed
0.2.6Nov 16, 2026>=5 <666.3 KB7 permissionsListed
0.2.5Nov 11, 2026>=5 <663.6 KB7 permissionsListed
0.2.4Nov 9, 2026>=5 <661.6 KB7 permissionsListed
0.2.3Oct 27, 2026>=2 <446.8 KB7 permissionsListed

Reviews and comments

0 threads · 0 reviews

No comments yet.