Skip to content

an open-source alternative to the dots, bots and muses of the world, run an office of claude code/codex like agents on your laptop, sandboxes or anywhere, uses your existing subscriptions

release: land the 0.4.5 drop and Dwight's manual-update fixes

Chaitanya Giria651dba10cd2
diff --git a/docs/drops/v0.4.5-release.md b/docs/drops/v0.4.5-release.md
new file mode 100644
index 00000000..30951965
--- /dev/null
+++ b/docs/drops/v0.4.5-release.md
@@ -0,0 +1,156 @@
+# Munder Difflin v0.4.5
+
+**A local hive of Claude Code, Antigravity, Codex, Gemini, Cursor, Grok & Copilot agents that run themselves.**
+Messaging, routing, and remembering, coordinated by your clone, Michael, who you talk to.
+
+---
+
+## What's new in 0.4.5
+
+**Focus mode that survives a restart, terminals that follow the app theme, two new engines, and a
+hive that wakes idle workers instead of letting mail pile up.** Plus the update notice itself now
+says what restarting does, and gets out of the way when you click it.
+
+- **Focus mode** (the thing we used to call fullscreen) comes back after a restart, survives
+ closing an agent, refits when the roster changes, and its close button no longer drops you
+ to the sidebar.
+- **Terminals match the window.** The app answers the OSC colour queries, tells running TUIs
+ when the theme flips, and hands Crush and OpenCode the theme at spawn so they stop rendering
+ dark on light. A partial ANSI escape split across pty chunks no longer leaks into the text.
+- **Gemini CLI and Cursor Agent** join the engine list.
+- **Michael hires on his own terms.** Spawning is behind a setting, he picks a worker's avatar
+ and accent, and agent names can be edited after spin up.
+- **Hive.** God's roster shows each agent's live context occupancy, a watchdog wakes idle workers
+ with undrained mail, mail to a missing inbox is bounced and logged instead of dropped, stale
+ nudges stop, the steer queue is capped, registry writes are atomic, and PROTOCOL.md refreshes
+ on boot so protocol changes reach existing hives.
+- **Windows.** Agent processes no longer keep running after the app quits.
+- **Updates.** Restart to update closes the notice first so the quit warning is never hidden
+ behind it; installs that cannot self update get a direct download for their platform.
+- **Founders' Wall** is automated from Razorpay: additions arrive as a PR, refunds are removed
+ directly.
+
+### Thanks
+
+Community work in this release: [@gts-47](https://github.com/gts-47) and everyone whose PRs
+landed on the integration branch. The full list is in CHANGELOG.md.
+
+---
+
+<!-- drop -->
+<style>
+ html, body { height: 100%; }
+ body { overflow: hidden; }
+ .wrap { height: 100%; display: flex; flex-direction: column;
+ padding: clamp(22px, 4vw, 40px) clamp(22px, 4vw, 40px) clamp(14px, 2vw, 22px); }
+ .scroll { flex: 1; min-height: 0; overflow-y: auto; padding-right: 4px; }
+ @media (prefers-reduced-motion: no-preference) {
+ .rise { animation: rise .4s cubic-bezier(.2,.7,.3,1) both; }
+ .rise.d1 { animation-delay: .08s } .rise.d2 { animation-delay: .16s } .rise.d3 { animation-delay: .24s }
+ @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
+ }
+
+ .kicker { font-size: 11.5px; font-weight: 700; letter-spacing: .14em;
+ text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
+ .big { font-size: clamp(2.6rem, 8vw, 4.2rem); line-height: .95; letter-spacing: -.045em;
+ font-weight: 700; margin: 0 0 .15em;
+ background: linear-gradient(135deg, #14131A 20%, #1B7F5A 115%);
+ -webkit-background-clip: text; background-clip: text; color: transparent; }
+ .lede { font-size: clamp(1rem, 2vw, 1.15rem); margin: 0 0 18px; max-width: 34em; }
+
+ .plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
+ .plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
+ .tag { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
+ text-transform: uppercase; color: var(--accent);
+ background: rgba(27,127,90,.09); padding: 4px 9px; border-radius: 999px; }
+ .plan h2 { margin: 8px 0 2px; font-size: 1.15rem; letter-spacing: -.02em; }
+ .plan .sub { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 8px; }
+ .plan ul { list-style: none; padding: 0; margin: 0; }
+ .plan li { font-size: 13px; padding: 4px 0 4px 18px; position: relative; }
+ .plan li::before { content: ""; position: absolute; left: 2px; top: 11px; width: 8px; height: 8px;
+ border-radius: 999px; background: var(--accent); }
+
+ .ribbon { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 13px 16px;
+ border-radius: var(--radius); background: var(--ink); color: #FBFAF8; }
+ .ribbon .yr { font-size: 2rem; font-weight: 700; letter-spacing: -.04em; line-height: 1;
+ color: #F2C14E; flex-shrink: 0; }
+ .ribbon b { font-size: 1rem; letter-spacing: -.01em; }
+ .ribbon span { font-size: 12.5px; opacity: .78; }
+
+ h3 { font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
+ color: var(--ink-soft); margin: 22px 0 6px; }
+ .rows { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 22px; }
+ .rows li { break-inside: avoid; display: grid; grid-template-columns: 78px 1fr; gap: 10px;
+ align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
+ .rows i { font-style: normal; font-size: 10px; font-weight: 700; letter-spacing: .09em;
+ text-transform: uppercase; color: var(--ink-soft); }
+ .rows b { font-weight: 620; }
+ .rows p { margin: 1px 0 0; color: var(--ink-soft); font-size: 12px; }
+
+ .foot { flex-shrink: 0; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
+ font-size: 12.5px; color: var(--ink-soft); text-align: center; }
+ .foot b { color: var(--ink); font-weight: 640; }
+ @media (max-width: 640px) { .plans { grid-template-columns: 1fr; } .rows { columns: 1; } }
+</style>
+
+<div class="wrap">
+ <div class="scroll">
+ <p class="kicker rise">Munder Difflin</p>
+ <h1 class="big rise">0.4.5</h1>
+ <p class="lede rise d1">Focus mode that stays put, terminals that match the window, two new
+ engines, and a hive that wakes the workers who have mail waiting.</p>
+
+ <div class="plans rise d2">
+ <div class="plan">
+ <span class="tag">Focus mode</span>
+ <h2>One agent, the whole window</h2>
+ <p class="sub">We stopped calling it fullscreen, because it never was.</p>
+ <ul>
+ <li>Comes back after a restart, and is remembered as your default view</li>
+ <li>Closing an agent moves focus to the next one instead of ending the view</li>
+ <li>The terminal refits when the roster changes, so the last row is never hidden</li>
+ </ul>
+ </div>
+ <div class="plan">
+ <span class="tag">Terminal</span>
+ <h2>TUIs follow the window</h2>
+ <p class="sub">Light on light, dark on dark, and told when it flips.</p>
+ <ul>
+ <li>Claude Code, Crush and OpenCode get the app theme at spawn and on every toggle</li>
+ <li>OSC colour queries are answered, so a TUI can ask instead of guessing</li>
+ <li>An ANSI sequence split across two chunks is carried over and stripped whole</li>
+ </ul>
+ </div>
+ </div>
+
+ <div class="ribbon rise d3">
+ <div class="yr">+2</div>
+ <div><b>Gemini CLI and Cursor Agent are on the floor.</b><br>
+ <span>Hire either like any other engine. Michael can pick them too, now that his hiring
+ sits behind a setting and he chooses each worker's avatar and accent himself.</span></div>
+ </div>
+
+ <h3>Also in this release</h3>
+ <ul class="rows">
+ <li><i>Agents</i><div><b>Rename an agent after spin up</b>
+ <p>Typed names map to avatars; the add agent sheet labels the real project.</p></div></li>
+ <li><i>Hive</i><div><b>God sees each agent's context occupancy</b>
+ <p>A ctx NN% tag on the roster, and big work goes to the agent with room.</p></div></li>
+ <li><i>Hive</i><div><b>Idle workers are woken when mail waits</b>
+ <p>Mail to a missing inbox bounces instead of vanishing; stale nudges stop.</p></div></li>
+ <li><i>Hive</i><div><b>PROTOCOL.md refreshes on boot</b>
+ <p>Protocol changes reach hives that already exist.</p></div></li>
+ <li><i>Hive</i><div><b>God hired workers get a floor card, and it archives on death</b></div></li>
+ <li><i>Windows</i><div><b>Quitting the app quits the agents</b></div></li>
+ <li><i>Setup</i><div><b>Your engine is checked before the pick is committed</b></div></li>
+ <li><i>Config</i><div><b>A tilde in a saved path expands at every seam</b></div></li>
+ <li><i>Antigravity</i><div><b>The queue no longer sticks for 30 seconds</b></div></li>
+ <li><i>Updates</i><div><b>Portable installs get a direct download for their platform</b></div></li>
+ <li><i>Wall</i><div><b>The Founders' Wall syncs from Razorpay</b></div></li>
+ <li><i>Community</i><div><b>A Discord, and a role when your PR lands</b></div></li>
+ </ul>
+ </div>
+ <p class="foot"><b>Restart to update</b> closes the app and every running agent, so finish or
+ pause what they are doing first. Pick Later and it installs the next time you quit.</p>
+</div>
+<!-- /drop -->
diff --git a/src/main/updater.ts b/src/main/updater.ts
index a9603a80..4041ca81 100644
--- a/src/main/updater.ts
+++ b/src/main/updater.ts
@@ -1,7 +1,7 @@
import { app, ipcMain, shell } from 'electron';
import type { WebContents } from 'electron';
import { request as httpsRequest } from 'node:https';
-import { appendFileSync, mkdirSync } from 'node:fs';
+import { appendFileSync, mkdirSync, readFileSync } from 'node:fs';
import { join } from 'node:path';
import { readConfig } from './config';
import { DEFAULT_DROP_HTML } from '../shared/releaseDrop';
@@ -116,6 +116,27 @@ function errText(e: unknown): string {
return m.length > 300 ? `${m.slice(0, 300)}…` : m;
}
+/** The one asset in a release that installs on THIS machine, by the names
+ * electron-builder.yml produces: mac-{arch}.dmg, win-x64-setup.exe,
+ * linux-x86_64.AppImage. Null when the release has no matching asset, and the
+ * caller falls back to the releases page. Download URLs live under
+ * github.com/REPO/releases/download/, so the openRelease prefix guard already
+ * admits them. */
+export function pickDownloadAsset(
+ assets: ReadonlyArray<{ name?: string; browser_download_url?: string }> | undefined,
+ platform: NodeJS.Platform = process.platform,
+ arch: string = process.arch
+): string | null {
+ if (!Array.isArray(assets)) return null;
+ const want = platform === 'darwin' ? new RegExp(`-mac-${arch}\\.dmg$`)
+ : platform === 'win32' ? /-win-x64-setup\.exe$/
+ : platform === 'linux' ? /-linux-x86_64\.AppImage$/
+ : null;
+ if (!want) return null;
+ const hit = assets.find((a) => typeof a.name === 'string' && want.test(a.name) && typeof a.browser_download_url === 'string');
+ return hit?.browser_download_url ?? null;
+}
+
/** Notify-only check against releases/latest (no download). Never throws. */
function fallbackCheck(reason: string | undefined, force = false): void {
const now = Date.now();
@@ -136,7 +157,7 @@ function fallbackCheck(reason: string | undefined, force = false): void {
res.on('data', (d) => { body += d; if (body.length > 262_144) req.destroy(); });
res.on('end', () => {
try {
- const rel = JSON.parse(body) as { tag_name?: string; html_url?: string; body?: string };
+ const rel = JSON.parse(body) as { tag_name?: string; html_url?: string; body?: string; assets?: Array<{ name?: string; browser_download_url?: string }> };
const tag = rel.tag_name ?? '';
if (tag && isNewer(tag, app.getVersion())) {
emit({
@@ -144,6 +165,7 @@ function fallbackCheck(reason: string | undefined, force = false): void {
version: tag.replace(/^v/, ''),
url: rel.html_url ?? `https://github.com/${REPO}/releases/latest`,
reason,
+ downloadUrl: pickDownloadAsset(rel.assets) ?? undefined,
// Already in the response we just parsed — carrying it costs
// nothing and lets the notify-only toast show "What's new" too.
// NOT a new request: see TELEMETRY.md, this app never adds one.
@@ -286,10 +308,27 @@ export function initAutoUpdater(getWebContents: () => WebContents | null): void
: SIMULATED_NOTES;
emit(o.state === 'downloaded'
? { state: 'downloaded', version, notes }
- : { state: 'available-manual', version, notes, url: `https://github.com/${REPO}/releases/tag/v${version}` });
+ : { state: 'available-manual', version, notes, url: `https://github.com/${REPO}/releases/tag/v${version}`, downloadUrl: `https://github.com/${REPO}/releases/download/v${version}/Munder-Difflin-${version}-mac-${process.arch}.dmg` });
logLine(`SIMULATED ${o.state === 'downloaded' ? 'downloaded' : 'available-manual'} ${version} (dev only)`);
return { ok: true };
});
+ // DEV ONLY — `MD_DROP_PREVIEW=<path to a release body .md>` (see
+ // `npm run dev:drop`) feeds that file through the simulate path on boot, so a
+ // drop under authoring opens centred the moment the window is up, with no
+ // DevTools paste. The renderer pulls `update:current` on mount, so emitting
+ // before the window exists is fine. Same hard gate as `update:simulate`.
+ const previewPath = process.env.MD_DROP_PREVIEW;
+ if (!app.isPackaged && previewPath) {
+ try {
+ const notes = readFileSync(previewPath, 'utf8');
+ const m = notes.match(/what[’']?s\s+new\s+in\s+v?(\d+\.\d+\.\d+)/i) ?? notes.match(/\bv(\d+\.\d+\.\d+)\b/);
+ const version = m?.[1] ?? '9.9.9';
+ emit({ state: 'available-manual', version, notes, url: `https://github.com/${REPO}/releases/tag/v${version}`, downloadUrl: `https://github.com/${REPO}/releases/download/v${version}/Munder-Difflin-${version}-mac-${process.arch}.dmg` });
+ logLine(`SIMULATED available-manual ${version} from MD_DROP_PREVIEW=${previewPath} (dev only)`);
+ } catch (e) {
+ logLine(`MD_DROP_PREVIEW unreadable: ${errText(e)}`);
+ }
+ }
ipcMain.handle('update:openRelease', (_evt, url: unknown) => {
const href = typeof url === 'string' ? url : `https://github.com/${REPO}/releases/latest`;
// Only ever open the project's releases page — this is not a generic opener.
diff --git a/src/renderer/src/components/UpdateToast.tsx b/src/renderer/src/components/UpdateToast.tsx
index f9ac5eef..85c09700 100644
--- a/src/renderer/src/components/UpdateToast.tsx
+++ b/src/renderer/src/components/UpdateToast.tsx
@@ -144,19 +144,33 @@ export function UpdateToast() {
if (!status) return null;
+ /** Close the notice FIRST, then ask main to quit and install. The quit path
+ * raises the kill-and-quit warning when agents are running, and leaving a
+ * "restarting…" notice on screen behind it just gives the user two things to
+ * read. (The warning outranking every modal is a separate fix — this one is
+ * about not asking two questions at once.) If main reports it could not quit,
+ * the notice comes back so the user can retry; a user CANCEL of the warning
+ * is not a failure, and the notice stays closed. */
const restart = async () => {
+ const prev = status;
setBusy(true);
+ setStatus(null);
try {
const res = await window.cth.updateRestartAndInstall();
- if (!res.ok) setBusy(false); // stayed alive — let the user retry
- } catch { setBusy(false); }
+ if (!res.ok) { setStatus(prev); setBusy(false); }
+ } catch { setStatus(prev); setBusy(false); }
};
/** Same call the manual state's button makes: main resolves `undefined` to
* the releases page and refuses any URL outside this repo. */
const openRelease = () => {
- void window.cth.updateOpenRelease(status.state === 'available-manual' ? status.url : undefined);
+ void window.cth.updateOpenRelease(
+ status.state === 'available-manual' ? (status.downloadUrl ?? status.url) : undefined
+ );
};
+ /** True when the release carries an installer for THIS machine, so the button
+ * can promise a download rather than a page to go hunting on. */
+ const hasDownload = status.state === 'available-manual' && !!status.downloadUrl;
// An authored release: hand the whole moment to the centered drop instead of
// the corner toast. Nothing is passed in but the content — the drop carries no
@@ -270,7 +284,7 @@ export function UpdateToast() {
onClick={openRelease}
style={buttonStyle}
>
- open releases
+ {hasDownload ? `download ${status.version}` : 'open releases'}
</button>
)}
</div>
diff --git a/src/shared/updateState.ts b/src/shared/updateState.ts
index 2e33d1dd..1a894748 100644
--- a/src/shared/updateState.ts
+++ b/src/shared/updateState.ts
@@ -21,7 +21,11 @@ export type UpdateStatus =
* `notes` is the release body — the notify-only poll already reads the same
* `releases/latest` JSON that carries it, so the toast can show "what's new"
* here too without a second request. */
- | { state: 'available-manual'; version: string; url: string; reason?: string; notes?: string }
+ | { state: 'available-manual'; version: string; url: string; reason?: string; notes?: string;
+ /** Direct asset for THIS platform/arch, when the release has one. The
+ * modal's primary button downloads it; without it the button falls back
+ * to the releases page. */
+ downloadUrl?: string }
| { state: 'error'; message: string };
export type UpdateAction = 'none' | 'check' | 'download' | 'restart' | 'open-release';
diff --git a/test/update-download-asset.test.cjs b/test/update-download-asset.test.cjs
new file mode 100644
index 00000000..667f4569
--- /dev/null
+++ b/test/update-download-asset.test.cjs
@@ -0,0 +1,33 @@
+'use strict';
+// pickDownloadAsset: the manual-update button should download the one asset
+// that installs on this machine, and fall back to the releases page otherwise.
+const test = require('node:test');
+const assert = require('node:assert/strict');
+const loadTs = require('./load-ts.cjs');
+const { pickDownloadAsset } = loadTs('src/main/updater.ts');
+
+const assets = [
+ { name: 'Munder-Difflin-0.5.0-mac-arm64.dmg', browser_download_url: 'https://github.com/x/y/releases/download/v0.5.0/Munder-Difflin-0.5.0-mac-arm64.dmg' },
+ { name: 'Munder-Difflin-0.5.0-mac-arm64.zip', browser_download_url: 'https://github.com/x/y/releases/download/v0.5.0/Munder-Difflin-0.5.0-mac-arm64.zip' },
+ { name: 'Munder-Difflin-0.5.0-mac-x64.dmg', browser_download_url: 'https://github.com/x/y/releases/download/v0.5.0/Munder-Difflin-0.5.0-mac-x64.dmg' },
+ { name: 'Munder-Difflin-0.5.0-win-x64-setup.exe', browser_download_url: 'https://github.com/x/y/releases/download/v0.5.0/Munder-Difflin-0.5.0-win-x64-setup.exe' },
+ { name: 'Munder-Difflin-0.5.0-win-x64-portable.exe', browser_download_url: 'https://github.com/x/y/releases/download/v0.5.0/Munder-Difflin-0.5.0-win-x64-portable.exe' },
+ { name: 'Munder-Difflin-0.5.0-linux-x86_64.AppImage', browser_download_url: 'https://github.com/x/y/releases/download/v0.5.0/Munder-Difflin-0.5.0-linux-x86_64.AppImage' },
+ { name: 'latest-mac.yml', browser_download_url: 'https://github.com/x/y/releases/download/v0.5.0/latest-mac.yml' }
+];
+
+test('picks the dmg for the running mac arch, not the zip', () => {
+ assert.match(pickDownloadAsset(assets, 'darwin', 'arm64'), /mac-arm64\.dmg$/);
+ assert.match(pickDownloadAsset(assets, 'darwin', 'x64'), /mac-x64\.dmg$/);
+});
+test('picks the installer on windows, never the portable', () => {
+ assert.match(pickDownloadAsset(assets, 'win32', 'x64'), /win-x64-setup\.exe$/);
+});
+test('picks the AppImage on linux', () => {
+ assert.match(pickDownloadAsset(assets, 'linux', 'x64'), /AppImage$/);
+});
+test('null when nothing matches, so the button falls back to the releases page', () => {
+ assert.equal(pickDownloadAsset(assets, 'freebsd', 'x64'), null);
+ assert.equal(pickDownloadAsset([], 'darwin', 'arm64'), null);
+ assert.equal(pickDownloadAsset(undefined, 'darwin', 'arm64'), null);
+});