kaizen-agent 1.70.0 → 1.71.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +2 -2
  2. package/cli/annotate-proxy.ts +5 -0
  3. package/cli/automations.ts +10 -3
  4. package/cli/browser.ts +1 -1
  5. package/cli/chat.ts +9 -1
  6. package/cli/chatgpt.ts +2 -1
  7. package/cli/docs.ts +1 -1
  8. package/cli/google.ts +2 -1
  9. package/cli/handoff.ts +1 -1
  10. package/cli/install.ts +28 -8
  11. package/cli/knowledge.ts +1 -1
  12. package/cli/notes.ts +10 -1
  13. package/cli/settings.ts +5 -1
  14. package/cli/sources.ts +3 -2
  15. package/cli/state.ts +43 -5
  16. package/cli/versions.ts +1 -1
  17. package/cli/video.ts +1 -1
  18. package/cli/web.ts +43 -27
  19. package/cli/workers.ts +20 -7
  20. package/cli/worktree.ts +55 -15
  21. package/package.json +1 -1
  22. package/skills/kaizen/SKILL.md +12 -8
  23. package/skills/kaizen/config.default.yml +18 -2
  24. package/skills/kaizen/settings.md +3 -1
  25. package/skills/kaizen/spec-build.md +13 -2
  26. package/skills/kaizen/spec-main.md +2 -0
  27. package/skills/kaizen-help/SKILL.md +1 -0
  28. package/skills/media/kaizen-game/SKILL.md +96 -0
  29. package/skills/media/kaizen-game/assets/gdd.css +12 -0
  30. package/skills/media/kaizen-game/references/build.md +81 -0
  31. package/skills/media/kaizen-game/references/content.md +32 -0
  32. package/skills/media/kaizen-game/references/design.md +81 -0
  33. package/skills/media/kaizen-game/references/ship.md +34 -0
  34. package/skills/media/kaizen-game/references/verify.md +33 -0
  35. package/skills/media/kaizen-game/scripts/check.sh +13 -0
  36. package/skills/media/kaizen-game/scripts/frames.mjs +34 -0
  37. package/skills/media/kaizen-game/scripts/gdd-pdf.mjs +19 -0
  38. package/skills/media/kaizen-game/scripts/pw.mjs +18 -0
  39. package/skills/media/kaizen-game/scripts/serve.mjs +53 -0
  40. package/skills/media/kaizen-game/scripts/serve.test.mjs +18 -0
  41. package/skills/media/kaizen-game/scripts/setup.sh +9 -0
  42. package/skills/media/kaizen-game/scripts/smoke.mjs +40 -0
  43. package/skills/media/kaizen-game/skill.json +1 -0
  44. package/web/board/icebox.ts +6 -3
  45. package/web/board/markdown.ts +7 -2
  46. package/web/board/run-view.ts +1 -1
  47. package/web/board/settings-orchestration.ts +1 -1
  48. package/web/board/settings-pages.ts +1 -0
  49. package/web/board/settings-skills.ts +1 -0
  50. package/web/board/settings.ts +2 -2
  51. package/web/board.js +70 -70
  52. package/web/notebook.js +1 -1
  53. package/web/term.js +48 -48
  54. package/web/term.ts +16 -4
  55. package/web/video.js +1 -1
@@ -0,0 +1,9 @@
1
+ #!/bin/sh
2
+ # Installs Playwright + Chromium into ~/.kaizen/kaizen-game (override KAIZEN_GAME_HOME). About 150 MB.
3
+ set -e
4
+ H="${KAIZEN_GAME_HOME:-$HOME/.kaizen/kaizen-game}"
5
+ mkdir -p "$H"
6
+ [ -f "$H/package.json" ] || echo '{"private":true}' > "$H/package.json"
7
+ npm install --prefix "$H" --no-audit --no-fund playwright@1.62.1
8
+ cd "$H" && npx playwright install chromium
9
+ echo "ok: $H"
@@ -0,0 +1,40 @@
1
+ // Smoke test: load a page (or each ?screen=) at phone and desktop size, fail on errors and horizontal overflow.
2
+ // Usage: node smoke.mjs <url> [--screens hub,result,view=spectator] [--param screen] [--out shots] [--wait 2500] [--gpu]
3
+ // An entry with "=" is added to the query as is; others become ?<param>=<entry>. Exit 1 on any failure.
4
+ import fs from 'node:fs';
5
+ import { chromium, SOFT, GPU, arg, flag } from './pw.mjs';
6
+
7
+ const base = process.argv[2];
8
+ if (!base || base.startsWith('--')) { console.error('usage: node smoke.mjs <url> [--screens a,b] [--out shots] [--gpu]'); process.exit(2); }
9
+ const screens = String(arg('screens', '')).split(',').filter(Boolean), param = arg('param', 'screen');
10
+ const out = arg('out', 'shots'), wait = +arg('wait', 2500);
11
+ fs.mkdirSync(out, { recursive: true });
12
+ const SIZES = [['phone', { viewport: { width: 390, height: 844 }, deviceScaleFactor: 2, isMobile: true, hasTouch: true }],
13
+ ['desktop', { viewport: { width: 1440, height: 900 }, deviceScaleFactor: 1 }]];
14
+ const url = s => { if (!s) return base; const u = new URL(base); const [k, v] = s.includes('=') ? s.split('=') : [param, s]; u.searchParams.set(k, v); return u.href; };
15
+
16
+ const b = await chromium.launch({ args: flag('gpu') ? GPU : SOFT });
17
+ let fails = 0;
18
+ for (const [size, opts] of SIZES) {
19
+ const ctx = await b.newContext(opts);
20
+ for (const s of screens.length ? screens : ['']) {
21
+ const p = await ctx.newPage(), errs = [];
22
+ p.on('pageerror', e => errs.push('pageerror: ' + e.message));
23
+ p.on('console', m => { if (m.type() === 'error') errs.push('console: ' + m.text()); });
24
+ p.on('response', r => { if (r.status() >= 400) errs.push(`http ${r.status()}: ${r.url()}`); });
25
+ p.on('requestfailed', r => r.failure()?.errorText !== 'net::ERR_ABORTED' && errs.push(`failed: ${r.url()} ${r.failure()?.errorText}`));
26
+ try { await p.goto(url(s), { waitUntil: 'networkidle', timeout: 30000 }); } catch (e) { errs.push('load: ' + e.message.split('\n')[0]); }
27
+ await p.waitForTimeout(wait);
28
+ const ov = await p.evaluate(() => document.documentElement.scrollWidth - innerWidth).catch(() => 0);
29
+ if (ov > 1) errs.push(`horizontal overflow ${ov}px`);
30
+ const name = `${out}/${size}-${(s || 'page').replace(/[^\w-]+/g, '_')}.png`;
31
+ await p.screenshot({ path: name }).catch(e => errs.push('screenshot: ' + e.message));
32
+ console.log(`${errs.length ? 'FAIL' : 'PASS'} ${size} ${s || '(page)'} ${name}`);
33
+ errs.forEach(e => console.log(' ' + e)); fails += errs.length ? 1 : 0;
34
+ await p.close();
35
+ }
36
+ await ctx.close();
37
+ }
38
+ await b.close();
39
+ console.log(fails ? `${fails} failed` : 'all checks passed');
40
+ process.exit(fails ? 1 : 0);
@@ -0,0 +1 @@
1
+ {"title": "Make game", "group": "media", "needs": ["node"], "status": "beta"}
@@ -8,6 +8,9 @@ import { taskCombo, newDir, plogo, setShown, short, showable } from "./projects.
8
8
  import { playSound, soundPick, toast } from "./toast.ts";
9
9
  import { go, view } from "./views.ts";
10
10
 
11
+ // A link from sources.json or a gathered post: the server checks it on the way in, this keeps a javascript: URL from ever being a clickable href.
12
+ const web = (u: string) => (/^https?:\/\//i.test(String(u)) ? u : "#");
13
+
11
14
  // ---- the icebox: requests gathered from request sources, read like an inbox, until
12
15
  // someone promotes them to tasks or dismisses them. The sources themselves sit in a
13
16
  // section below, folded. Same panel as settings.
@@ -229,7 +232,7 @@ export async function openSources() {
229
232
  : html`<span class="src-badge warn"><svg viewBox="0 0 16 16"><circle cx="8" cy="8" r="6" stroke="currentColor" fill="none" stroke-width="1.8"/><path d="M8 5v3.5M8 11v.1" stroke="currentColor" fill="none" stroke-width="2" stroke-linecap="round"/></svg>Failed: ${s.last.note}</span><span class="hint" style="margin:0">${ago(s.last.at)}</span>`;
230
233
  const kind = st === "sheet" ? "sheet" : st === "doc" ? "doc" : st === "social" ? "at" : "link",
231
234
  bare = s.url.replace(/^https?:\/\/(www\.)?/, "");
232
- return html`<div class="src-card" id="src-card-${i}"><div class="src-hd"><span class="src-ico" title="${st === "social" ? (PLAT[s.social] || "social") : st}">${fav(s.url, kind, s.social)}</span><div class="src-info"><span class="src-title" title="${title}">${title}</span><a class="src-url" href="${s.url}" target="_blank" rel="noopener noreferrer" title="${s.url}"><span>${bare}</span>${ico("ext")}</a></div><div class="src-acts">${s.social ? html`<button class="ib sm" id="src-ag-${i}" data-ag="${i}" aria-label="Gather ${title} with your agent" title="${chatOn ? "Gather with your ChatGPT plan" : "Gather: opens your agent on /kaizen gather"}">${ico("refresh")}</button>` : html`<button class="ib sm" id="src-chk-${i}" data-chk="${i}" aria-label="Check ${title} now" title="Check now">${ico("refresh")}</button>`}<button class="ib sm danger" id="src-rm-${i}" data-rm="${i}" aria-label="Remove ${title}" title="Remove source">${ico("trash")}</button></div></div><div class="src-status">${statusHtml}</div><div class="src-fields"><label class="src-f" title="Category"><span>Category</span><input class="sel" id="src-ct-${i}" data-ct="${i}" data-k="${s.dir + " " + s.url}" value="${s.category || ""}" placeholder="${platOf(s)}" maxlength="40" aria-label="Category of ${title}"><button class="btn sm pri" id="src-cs-${i}" aria-label="Save the category of ${title}" disabled>Save</button></label><label class="src-f" title="Project"><span>Project</span>${plogo(s.dir, s.project || "")}<select class="sel" id="src-mv-${i}" data-mv="${i}" data-k="${s.dir + " " + s.url}" aria-label="Project of ${title}">${opts(s.dir, s.project)}</select><button class="btn sm pri" id="src-mb-${i}" aria-label="Move ${title} to the chosen project" disabled>Move</button></label></div><div class="src-sws">${st === "sheet" || /github\.com/.test(s.url) ? html`<label class="src-sw">Write back<button class="chk sm${s.writeback ? " on" : ""}" id="src-wb-${i}" data-wb="${i}" role="switch" aria-checked="${String(!!s.writeback)}" aria-label="Write back to ${title}"></button></label>` : ""}<label class="src-sw" title="Off: the scheduled gather skips this source; Check now still reads it">Auto gather<button class="chk sm${s.paused ? "" : " on"}" id="src-ag-on-${i}" data-ag-on="${i}" role="switch" aria-checked="${String(!s.paused)}" aria-label="Auto gather ${title}"></button></label></div></div>`;
235
+ return html`<div class="src-card" id="src-card-${i}"><div class="src-hd"><span class="src-ico" title="${st === "social" ? (PLAT[s.social] || "social") : st}">${fav(s.url, kind, s.social)}</span><div class="src-info"><span class="src-title" title="${title}">${title}</span><a class="src-url" href="${web(s.url)}" target="_blank" rel="noopener noreferrer" title="${s.url}"><span>${bare}</span>${ico("ext")}</a></div><div class="src-acts">${s.social ? html`<button class="ib sm" id="src-ag-${i}" data-ag="${i}" aria-label="Gather ${title} with your agent" title="${chatOn ? "Gather with your ChatGPT plan" : "Gather: opens your agent on /kaizen gather"}">${ico("refresh")}</button>` : html`<button class="ib sm" id="src-chk-${i}" data-chk="${i}" aria-label="Check ${title} now" title="Check now">${ico("refresh")}</button>`}<button class="ib sm danger" id="src-rm-${i}" data-rm="${i}" aria-label="Remove ${title}" title="Remove source">${ico("trash")}</button></div></div><div class="src-status">${statusHtml}</div><div class="src-fields"><label class="src-f" title="Category"><span>Category</span><input class="sel" id="src-ct-${i}" data-ct="${i}" data-k="${s.dir + " " + s.url}" value="${s.category || ""}" placeholder="${platOf(s)}" maxlength="40" aria-label="Category of ${title}"><button class="btn sm pri" id="src-cs-${i}" aria-label="Save the category of ${title}" disabled>Save</button></label><label class="src-f" title="Project"><span>Project</span>${plogo(s.dir, s.project || "")}<select class="sel" id="src-mv-${i}" data-mv="${i}" data-k="${s.dir + " " + s.url}" aria-label="Project of ${title}">${opts(s.dir, s.project)}</select><button class="btn sm pri" id="src-mb-${i}" aria-label="Move ${title} to the chosen project" disabled>Move</button></label></div><div class="src-sws">${st === "sheet" || /github\.com/.test(s.url) ? html`<label class="src-sw">Write back<button class="chk sm${s.writeback ? " on" : ""}" id="src-wb-${i}" data-wb="${i}" role="switch" aria-checked="${String(!!s.writeback)}" aria-label="Write back to ${title}"></button></label>` : ""}<label class="src-sw" title="Off: the scheduled gather skips this source; Check now still reads it">Auto gather<button class="chk sm${s.paused ? "" : " on"}" id="src-ag-on-${i}" data-ag-on="${i}" role="switch" aria-checked="${String(!s.paused)}" aria-label="Auto gather ${title}"></button></label></div></div>`;
233
236
  });
234
237
  const fails = ((d && d.failed) || []).map((f) => html`<p style="color:var(--dim)">The sources of ${f} could not be read.</p>`);
235
238
  const emptyState = html`<div class="src-empty"><div class="src-empty-ico">${ico("link")}</div><h4>No sources yet</h4></div>`;
@@ -371,7 +374,7 @@ export async function openSources() {
371
374
  open = iceForm === k;
372
375
  const head = html`<div class="ice-row${iceCur === k ? " cur" : ""}${iceSel.has(k) ? " sel" : ""}" data-i="${i}" data-k="${k}"><input type="checkbox" id="ice-ck-${i}" data-ck="${i}"${iceSel.has(k) ? " checked" : ""} aria-label="Select: ${it.text}"><span class="ice-src" title="${srcName(it)}">${fav(it.source, "link", list.find((x) => x.dir === it.dir && x.url === it.source)?.social)}</span><button class="ice-t" id="ice-o-${i}" data-o="${i}" aria-expanded="${String(open)}" title="${it.text}">${it.text}</button><span class="ice-meta">${many ? html`<span class="nm" title="${it.project || ""}">${plogo(it.dir, it.project || "")}${short(it.project || "")}</span>` : ""}${it.status === "done" && it.written ? html`<span title="Written back ${ago(it.written)}">written back</span>` : ""}${it.status === "done" && it.writeError ? html`<span title="${it.writeError}">write-back failed</span>` : ""}${it.status === "promoted" ? html`<span title="Promoted to Tasks: ${it.idea || ""}">promoted</span>` : ""}${it.replied ? html`<span title="Replied ${ago(it.replied)}">replied</span>` : ""}<span class="ice-age">${ago(it.at)}</span><span class="ice-ra">${it.status === "promoted" || it.status === "done" ? "" : html`<button class="btn ghost sm" id="ice-pr-${i}" data-pr="${i}" title="Promote to Tasks (p)" aria-label="Promote to Tasks: ${it.text}">${ico("plus")}</button>`}${it.status === "promoted" || it.status === "done" ? "" : it.status === "dismissed" ? html`<button class="btn ghost sm" id="ice-rs-${i}" data-rs="${i}" title="Restore to waiting" aria-label="Restore: ${it.text}">Restore</button>` : html`<button class="btn ghost sm" id="ice-ds-${i}" data-ds="${i}" title="Dismiss (d)" aria-label="Dismiss: ${it.text}">${ico("x")}</button>`}</span></span></div>`;
373
376
  const more = open
374
- ? html`<div class="ice-open">${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}<span class="hint" style="margin:0">From ${srcName(it)} · ${ago(it.at)}${it.post ? html` · <a href="${it.post}" target="_blank" rel="noopener">open post</a>` : ""}</span>${replyBox(it)}${icePro === k ? form(it) : ""}</div>`
377
+ ? html`<div class="ice-open">${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}<span class="hint" style="margin:0">From ${srcName(it)} · ${ago(it.at)}${it.post ? html` · <a href="${web(it.post)}" target="_blank" rel="noopener">open post</a>` : ""}</span>${replyBox(it)}${icePro === k ? form(it) : ""}</div>`
375
378
  : "";
376
379
  return html`${head}${more}`;
377
380
  };
@@ -390,7 +393,7 @@ export async function openSources() {
390
393
  const pName = (it) => it.project || store.S.projects.find((p) => p.dir === it.dir)?.label || "";
391
394
  const swCard = (i, back) => {
392
395
  const it = ice[i];
393
- return html`<div class="sw-card${back ? " back" : ""}"${back ? raw(' aria-hidden="true"') : raw(' id="sw-card" tabindex="-1" aria-label="Request: swipe or press → to promote, ← to dismiss"')}><div class="sw-hd">${fav(it.source, "link", srcOf(it)?.social)}<span class="sw-src" title="${srcName(it)}">${srcName(it)}</span><span class="sw-proj" title="${pName(it)}">${plogo(it.dir, pName(it))}${short(pName(it))}</span><span class="ice-age">${ago(it.at)}</span></div><p class="sw-t">${it.text}</p>${back ? "" : html`${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}${it.post ? html`<a class="hint" href="${it.post}" target="_blank" rel="noopener">open post</a>` : ""}<span class="sw-stamp pro">Promote</span><span class="sw-stamp dis">Dismiss</span>`}</div>`;
396
+ return html`<div class="sw-card${back ? " back" : ""}"${back ? raw(' aria-hidden="true"') : raw(' id="sw-card" tabindex="-1" aria-label="Request: swipe or press → to promote, ← to dismiss"')}><div class="sw-hd">${fav(it.source, "link", srcOf(it)?.social)}<span class="sw-src" title="${srcName(it)}">${srcName(it)}</span><span class="sw-proj" title="${pName(it)}">${plogo(it.dir, pName(it))}${short(pName(it))}</span><span class="ice-age">${ago(it.at)}</span></div><p class="sw-t">${it.text}</p>${back ? "" : html`${it.notes ? html`<div class="ice-notes">${it.notes}</div>` : ""}${imgs(it)}${it.post ? html`<a class="hint" href="${web(it.post)}" target="_blank" rel="noopener">open post</a>` : ""}<span class="sw-stamp pro">Promote</span><span class="sw-stamp dis">Dismiss</span>`}</div>`;
394
397
  };
395
398
  // Icebox zero: the day's streak counts days in a row the stack was emptied, per project
396
399
  // filter, in this browser only.
@@ -1,4 +1,5 @@
1
1
  import { esc } from "./dom.ts";
2
+ import { safeUrl } from "../notes-lib.ts";
2
3
 
3
4
  // The builder's "## Preview" section of 03-impl.md: how to run the app, or the result itself,
4
5
  // and its "### How to test" steps.
@@ -101,8 +102,12 @@ export function md(src, tick) {
101
102
  .replace(/`([^`]+)`/g, "<code>$1</code>")
102
103
  .replace(/\*\*([^*]+)\*\*/g, "<b>$1</b>")
103
104
  .replace(/(^|[^*])\*([^*\s<][^*<]*?)\*(?!\*)/g, "$1<i>$2</i>")
104
- .replace(/!\[([^\]]*)\]\(([^)\s]+)\)/g, '<a href="$2" target="_blank"><img src="$2" alt="$1"></a>')
105
- .replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, '<a href="$2" target="_blank">$1</a>');
105
+ .replace(/!\[([^\]]*)\]\(([^)\s]+)\)/g, (m, a, u) =>
106
+ safeUrl(u) ? `<a href="${u}" target="_blank" rel="noopener noreferrer"><img src="${u}" alt="${a}"></a>` : m,
107
+ )
108
+ .replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (m, t, u) =>
109
+ safeUrl(u) ? `<a href="${u}" target="_blank" rel="noopener noreferrer">${t}</a>` : m,
110
+ );
106
111
  const endList = () => {
107
112
  if (list) {
108
113
  out.push(`</${list}>`);
@@ -598,7 +598,7 @@ async function previewPane(el: HTMLElement) {
598
598
  if (!pv && (await directPreview(el))) return;
599
599
  const url = loopbackUrl(pv);
600
600
  const shots = pv && /!\[[^\]]*\]\(/.test(pv);
601
- if (url && loopback && !shots) return void el.insertAdjacentHTML("beforeend", String(html`<iframe class="rframe" title="Preview" src="${url}"></iframe>`));
601
+ if (url && loopback && !shots) return void el.insertAdjacentHTML("beforeend", String(html`<iframe class="rframe" title="Preview" src="${/^https?:\/\//i.test(String(url)) ? url : "about:blank"}"></iframe>`));
602
602
  const bar = url ? html`<div class="urlbar"><span class="sel">${url}</span>${winBtn(url)}</div>` : "";
603
603
  el.insertAdjacentHTML("beforeend", String(html`${bar}<div class="rprev md">${pv ? raw(md(attach(pv, card))) : html`<p class="rnone">This run has no Preview yet.</p>`}</div>`));
604
604
  el.querySelector<HTMLElement>(".urlbar [data-b=win]")?.addEventListener("click", () => void openWindow(url!));
@@ -7,7 +7,7 @@ const SUGGEST: Record<string, string[]> = { claude: ["haiku", "sonnet", "opus"]
7
7
 
8
8
  // The worker model row's label (the tool's icon and name) and its input with that tool's suggestions.
9
9
  export const modelLabel = (r: { key: string; label: string }) =>
10
- html`<img class="ag-i" src="${AGENT_FAVICONS[r.key.split(".").pop()!] ?? ""}" alt="" width="16" height="16" style="width:16px;height:16px;vertical-align:-3px;margin-right:6px;border-radius:3px">${r.label.replace("Worker model: ", "")}`;
10
+ html`<img class="ag-i" src="${AGENT_FAVICONS[r.key.split(".").pop()!] ?? ""}" alt="" width="16" height="16" style="width:16px;height:16px;vertical-align:-3px;margin-right:6px;border-radius:3px">${r.label.replace(/^(Worker|Handoff) model: /, "")}`;
11
11
  export const modelInput = (r: { key: string; value: string }, id: string) => {
12
12
  const tool = r.key.split(".").pop()!;
13
13
  return html`<span><input class="sel" id="${id}" value="${r.value}" placeholder="inherit" list="${id}-dl" spellcheck="false" autocomplete="off">${SUGGEST[tool] ? html`<datalist id="${id}-dl">${SUGGEST[tool]!.map((m) => html`<option value="${m}"></option>`)}</datalist>` : ""}</span>`;
@@ -31,6 +31,7 @@ export const SETTINGS_NAV: [string, SettingsPage[]][] = [
31
31
  const PLACES: [RegExp, string, string][] = [
32
32
  [/^(preset|runner|build\.|review\.executor)/, "agents", "Workflow"],
33
33
  [/^(subagents\.|agent\.model\.)/, "agents", "Models"],
34
+ [/^agent\.handoff_model\./, "agents", "Handoff session"],
34
35
  [/^agent\.default$/, "agents", "Default agent"],
35
36
  [/^agent\./, "agents", "Running agents"],
36
37
  [/^orchestration\./, "orchestration", "Workers"],
@@ -17,6 +17,7 @@ const SKILL_ICONS: Record<string, string> = {
17
17
  "kaizen-book": '<path d="M12 6c-2-1.5-5-2-8-2v15c3 0 6 .5 8 2 2-1.5 5-2 8-2V4c-3 0-6 .5-8 2Z"/><path d="M12 6v15"/>',
18
18
  "kaizen-deck": '<rect x="3" y="4" width="18" height="12" rx="1"/><path d="M12 16v4M8 20h8M8 12l3-3 2 2 3-3"/>',
19
19
  "kaizen-computer": '<rect x="3" y="4" width="18" height="12" rx="1"/><path d="M8 20h8M12 16v4M9 8l5 3-2 .8-.8 2Z"/>',
20
+ "kaizen-game": '<rect x="2" y="7" width="20" height="11" rx="5"/><path d="M7 10.5v4M5 12.5h4"/><circle cx="16" cy="11.5" r=".6"/><circle cx="18" cy="13.5" r=".6"/>',
20
21
  "kaizen-video": '<rect x="3" y="6" width="13" height="12" rx="2"/><path d="m16 10 5-3v10l-5-3"/>',
21
22
  };
22
23
  const PUZZLE = '<path d="M10 4a2 2 0 1 1 4 0v2h5v5h-2a2 2 0 1 0 0 4h2v5H5v-5h2a2 2 0 1 0 0-4H5V6h5Z"/>';
@@ -139,11 +139,11 @@ export async function openSettings() {
139
139
  // Drawn as chips with the agent list, above the rest of the page.
140
140
  cfg.rows = cfg.rows.filter((r) => !(r.key === "agent.default" && ap));
141
141
  // A model row only for a tool on this machine.
142
- if (ap) cfg.rows = cfg.rows.filter((r) => !r.key.startsWith("agent.model.") || ap.agents.some((a) => a.installed && r.key.endsWith("." + a.cmd)));
142
+ if (ap) cfg.rows = cfg.rows.filter((r) => !/^agent\.(model|handoff_model)\./.test(r.key) || ap.agents.some((a) => a.installed && r.key.endsWith("." + a.cmd)));
143
143
  for (const r of cfg.rows) {
144
144
  const id = "s-" + r.key.replace(/\./g, "-");
145
145
  const [page, sub] = placeOf(r.key);
146
- const wm = /^(orchestration\.worker_model|agent\.model)\./.test(r.key);
146
+ const wm = /^(orchestration\.worker_model|agent\.model|agent\.handoff_model)\./.test(r.key);
147
147
  put(page, sub + (scoped && r.group === "Board" ? " · all projects" : ""), row(
148
148
  wm ? modelLabel(r) : r.label,
149
149
  r.text