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.3
Permissions in 0.2.3
Files
upkeep.test.ts3.7 KB
// The update list: what is behind, what each item's button does, what a
// skip or a snooze hides, and which runs an update waits for.
import assert from "node:assert/strict";
import { test } from "node:test";
import type { Chat, UpdateStatus } from "divergence";
import { blocked, shownItems, updateItems, versionLine } from "./upkeep.ts";
import type { AgentEntry } from "./controller.ts";
const agent = (id: string, maintenance: AgentEntry["maintenance"], enabled = true): AgentEntry => ({
id,
name: id,
description: "",
capabilities: {},
authMethods: [],
status: { state: "ready" },
enabled,
maintenance,
});
const chat = (agentId: string, status: Chat["status"]) => ({ id: agentId, agentId, status }) as unknown as Chat;
const updates = {
enabled: true,
appVersion: "0.9.3",
appUpdate: { version: "0.9.4" },
plugins: { build: 41 },
pluginUpdate: { build: 42 },
} as unknown as UpdateStatus;
test("each item's button follows what can install it", () => {
const items = updateItems(
[
agent("npm", { installedVersion: "1.0.0", latestVersion: "1.1.0", canUpdate: true, manager: "npm" }),
agent("own", { installedVersion: "1.0.0", latestVersion: "1.1.0", canUpdate: false, command: "own update" }),
agent("curl", { installedVersion: "1.0.0", latestVersion: "1.1.0", canUpdate: false }),
agent("current", { installedVersion: "1.1.0", canUpdate: true }),
agent("off", { installedVersion: "1.0.0", latestVersion: "1.1.0", canUpdate: true }, false),
],
updates,
);
assert.deepEqual(
items.map((item) => [item.id, item.action, item.command]),
[
["npm", "update", null],
["own", "terminal", "own update"],
["curl", "manual", null],
["plugins", "update", null],
["app", "restart", null],
],
);
assert.equal(versionLine(items[0]!), "1.0.0 → 1.1.0");
assert.equal(versionLine(items[3]!), "build 41 → build 42");
// A copy that runs its plugins from a source tree has no releases.
assert.deepEqual(updateItems([], { ...updates, enabled: false }), []);
});
test("a skip hides one version, a snooze the row, and work under way shows through both", () => {
const items = updateItems(
[
agent("a", { installedVersion: "1.0.0", latestVersion: "1.1.0", canUpdate: true }),
agent("b", { installedVersion: "1.0.0", latestVersion: "2.0.0", canUpdate: true }),
],
null,
);
const now = 1_000;
const ids = (shown: { id: string }[]) => shown.map((item) => item.id);
assert.deepEqual(ids(shownItems(items, { skipped: { a: "1.1.0", b: "1.9.0" }, snoozedUntil: null }, {}, now)), ["b"]);
assert.deepEqual(ids(shownItems(items, { skipped: {}, snoozedUntil: now + 1 }, {}, now)), []);
assert.deepEqual(ids(shownItems(items, { skipped: {}, snoozedUntil: now + 1 }, { a: { state: "waiting" } }, now)), ["a"]);
assert.deepEqual(ids(shownItems(items, { skipped: {}, snoozedUntil: now }, {}, now)), ["a", "b"]);
});
test("an agent's update waits for its own runs, the app's and the plugins' for every run", () => {
const [codex, , app] = updateItems(
[agent("codex", { installedVersion: "1.0.0", latestVersion: "1.1.0", canUpdate: true })],
{ ...updates, pluginUpdate: null, appUpdate: { version: "0.9.4" } } as unknown as UpdateStatus,
).concat(updateItems([], { ...updates, pluginUpdate: null } as unknown as UpdateStatus));
assert.ok(codex && app);
assert.equal(blocked(codex, [chat("claude", "running")]), false);
assert.equal(blocked(codex, [chat("codex", "idle"), chat("codex", "failed")]), false);
assert.equal(blocked(codex, [chat("codex", "waiting_approval")]), true);
assert.equal(blocked(app, [chat("claude", "running")]), true);
assert.equal(blocked(app, [chat("claude", "idle")]), false);
});Versions
| Version | Published | Plugin API | Size | Permissions | Status |
|---|---|---|---|---|---|
| 0.2.8latest | Nov 21, 2026 | >=5 <6 | 68.5 KB | 7 permissions | Listed |
| 0.2.7 | Nov 18, 2026 | >=5 <6 | 68 KB | 7 permissions | Listed |
| 0.2.6 | Nov 16, 2026 | >=5 <6 | 66.3 KB | 7 permissions | Listed |
| 0.2.5 | Nov 11, 2026 | >=5 <6 | 63.6 KB | 7 permissions | Listed |
| 0.2.4 | Nov 9, 2026 | >=5 <6 | 61.6 KB | 7 permissions | Listed |
| 0.2.3 | Oct 27, 2026 | >=2 <4 | 46.8 KB | 7 permissions | Listed |
No comments yet.