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.8

Permissions in 0.2.8

  • 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.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.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/updates.tsx4.2 KB
// The Updates section: the app's own update, the default plugins' build,
// and when they were last checked. Install restarts when it must.
// HTM whitespace is significant; keep these templates out of Prettier's HTML formatter.
import type { EffectViewContext } from "divergence/effect";
import type { SettingsPage } from "../controller.ts";
import { card, notes, section, setting, column, row } from "./layout.tsx";
import { RESTARTING } from "../upkeep.ts";
import { relativeTime } from "../../sdk/ui/time.ts";

const when = (iso: string | null) => relativeTime(iso, "updates");

export function renderUpdates(ctx: EffectViewContext<object>, actions: SettingsPage["Service"]) {
  const u = actions.state.updates;
  if (!u) return <empty>Loading…</empty>;
  if (!u.enabled) {
    return section(
      "Updates",
      null,
      card([
        setting({
          title: `Divergence ${u.appVersion}`,
          description:
            "This copy runs its plugins from a source tree, so it updates from the repository, not from releases.",
        }),
      ]),
    );
  }
  const busy = !!u.busy;
  const app = u.appUpdate;
  const plugins = u.pluginUpdate;
  const current = u.plugins ? `Build ${u.plugins.build}, from Divergence ${u.plugins.version}.` : "Not from a release.";
  // The update row's jobs: one asked for while a chat runs waits for it.
  const jobs = actions.upkeep.state.jobs;
  const appWaits = jobs["app"]?.state === "waiting";
  const appRestarts = u.busy === RESTARTING;
  const pluginsWait = jobs["plugins"]?.state === "waiting";
  const downloading = !appRestarts && (u.busy === "downloading the update" || jobs["app"]?.state === "updating");
  return (
    <div {...column} gap="large" padding="small">
      {section(
                "Updates",
                u.error ? `Last check failed: ${u.error}` : u.lastChecked ? `Checked ${when(u.lastChecked)}.` : "Not checked yet.",
                card([
                  setting({
                    title: app ? `Divergence ${app.version} is available` : `Divergence ${u.appVersion}`,
                    description: appWaits
                      ? "The app installs the update and restarts when every chat is idle."
                      : appRestarts
                        ? "The update is downloaded. The app restarts when every chat is idle."
                        : app
                        ? `You have ${u.appVersion}. The app restarts to finish the update.`
                        : "This is the newest version.",
                    // Check now stays beside Install: a newer release may be out.
                    control: (
                      <div {...row} gap="small">
                        <button id="check-updates" label="Check now" icon="rotate-cw" small variant="outline" loading={u.checking} disabled={u.checking || busy} onClick={() => ctx.run(actions.checkNow())} />
                        {app ? <button id="install-app" label={downloading ? "Downloading…" : "Install and restart"} icon="circle-arrow-up" small variant="primary" loading={downloading} disabled={busy || appWaits} onClick={() => ctx.run(actions.installApp())} /> : null}
                      </div>
                    ),
                  }),
                  app ? notes(app.releaseNotes) : null,
                  setting({
                    title: plugins ? `New default plugins (build ${plugins.build})` : "Default plugins",
                    description: pluginsWait
                      ? "The plugins update when every chat is idle."
                      : plugins
                        ? "Plugins you have not changed update at once. For the ones you changed, an agent opens in the Plugins workspace and merges the update into your version."
                        : `${current} Up to date.`,
                    control: plugins
                      ? <button id="update-plugins" label="Update plugins" icon="circle-arrow-up" small variant={app ? "outline" : "primary"} loading={u.busy === "updating the plugins" || jobs["plugins"]?.state === "updating"} disabled={busy || pluginsWait} onClick={() => ctx.run(actions.applyPlugins())} />
                      : null,
                  }),
                ]),
              )}
    </div>
  );
}

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.