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

views/upkeep.tsx5.7 KB
// The update row in the sidebar's footer and the list it opens above
// itself when pressed. The row is there only while something is behind; each item in
// the list says what changes and what its button does, and the list ends
// with putting everything off until tomorrow or updating it all.
// HTM whitespace is significant; keep these templates out of Prettier's HTML formatter.
import * as kit from "divergence";
import type { Element } from "divergence";
import type { EffectViewContext } from "divergence/effect";
import { RESTARTING, versionLine } from "../upkeep.ts";
import type { Job, Upkeep, UpdateItem } from "../upkeep.ts";
import { column, fill, row } from "./layout.tsx";

const RAISED = kit.RAISED ?? { elevation: "raised" };
// The skip button shows only while the pointer is on its item.
const REVEAL = { visibility: "hidden", groupHover: { group: "update", visibility: "visible" } } as const;

function mark(item: UpdateItem): Element {
  if (item.id === "app") return <icon name="app-window" small tone="muted" />;
  if (item.id === "plugins") return <icon name="blocks" small tone="muted" />;
  return <icon name="bot" small tone="muted" svg={item.icon ?? undefined} />;
}

// The second line: the versions, or what is happening to them.
function detail(item: UpdateItem, job: Job | undefined, busy: string | null | undefined): { text: string; tone: "muted" | "danger" } {
  if (job?.state === "failed") return { text: job.message, tone: "danger" };
  if (job?.state === "waiting")
    return { text: item.agentId ? `Updates when ${item.name} is idle` : "Updates when every chat is idle", tone: "muted" };
  if (job?.state === "updating" && item.id === "app")
    return { text: busy === RESTARTING ? "Restarts when every chat is idle" : "Downloading…", tone: "muted" };
  if (job?.state === "updating") return { text: "Updating…", tone: "muted" };
  if (job?.state === "terminal") return { text: "Running in the terminal", tone: "muted" };
  if (item.action === "manual") return { text: `${versionLine(item)} · update it the way you installed it`, tone: "muted" };
  return { text: versionLine(item), tone: "muted" };
}

function control(ctx: EffectViewContext<object>, upkeep: Upkeep["Service"], item: UpdateItem, job: Job | undefined) {
  if (item.action === "manual") return null;
  if (job?.state === "waiting")
    return <button id={`update-cancel-${item.id}`} label="Cancel" small variant="ghost" onClick={() => ctx.run(upkeep.cancel(item))} />;
  const label =
    job?.state === "failed"
      ? "Retry"
      : item.action === "terminal"
        ? job?.state === "terminal"
          ? "Run again"
          : "Run in terminal"
        : item.action === "restart"
          ? "Restart"
          : "Update";
  return <button id={`update-${item.id}`} label={label} small variant="outline" loading={job?.state === "updating"} disabled={job?.state === "updating"} onClick={() => ctx.run(upkeep.request(item))} />;
}

function itemRow(ctx: EffectViewContext<object>, upkeep: Upkeep["Service"], item: UpdateItem) {
  const job = upkeep.state.jobs[item.id];
  const line = detail(item, job, upkeep.state.updates?.busy);
  const skippable = !job || job.state === "failed" || job.state === "terminal";
  return (
    <div {...row} group="update" gap="medium" padding="small" paddingX={6}>
      {mark(item)}
      <div {...column} {...fill} gap={1}>
          <text style="body" size="sm" weight={500} truncate>{item.name}</text>
          <text style="body" size="xs" tone={line.tone} truncate={line.tone !== "danger"}>{line.text}</text>
        </div>
      {skippable
                ? (
                  <div {...REVEAL}>
                    <button id={`update-skip-${item.id}`} icon="x" small variant="ghost" tooltip={`Skip ${item.to}`} onClick={() => ctx.run(upkeep.skip(item))} />
                  </div>
                )
                : null}
      {control(ctx, upkeep, item, job)}
    </div>
  );
}

export function renderUpdatesRow(ctx: EffectViewContext<object>, upkeep: Upkeep["Service"]): Element | null {
  const items = upkeep.shown();
  // Empty rather than null: the sidebar keeps an embedded view that drew
  // nothing at the height it last had, which held the rows above it up.
  if (!items.length) return <div />;
  const { jobs, open } = upkeep.state;
  const working = items.find((item) => jobs[item.id]?.state === "updating");
  const failed = items.some((item) => jobs[item.id]?.state === "failed");
  const [first] = items;
  const label = working
    ? `Updating ${working.name}…`
    : items.length === 1 && first
      ? `Update ${first.name}`
      : `${items.length} updates`;
  // One press for everything that installs here, when that is more than one.
  const all = items.filter((item) => item.action === "update" && !jobs[item.id]).length > 1;
  return (
    <popover id="updates" open={open} align="start" width={300} onDismiss={() => upkeep.setOpen(false)}>
      <div {...column}>
          <item id="sidebar-updates" icon={failed ? "circle-alert" : "circle-arrow-up"} iconTone={failed ? "danger" : undefined} label={label} busy={!!working} onClick={() => upkeep.setOpen(!open)} />
        </div>
      <div id="updates-list" {...column} gap={2} padding="small" background="card/40" backdrop={{ blur: 6 }} borderRadius="md" {...RAISED}>
          {items.map((item) => itemRow(ctx, upkeep, item))}
          <div {...row} gap="small" padding="small" paddingTop="medium">
              <button id="updates-snooze" label="Remind me tomorrow" small variant="ghost" onClick={() => ctx.run(upkeep.snooze())} />
              <spacer />
              {all ? <button id="updates-all" label="Update all" small variant="primary" onClick={() => ctx.run(upkeep.requestAll())} /> : null}
            </div>
        </div>
    </popover>
  );
}

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.