Repository navigation
Tool Panels
Wijanarko Putra Rajeb edited this page Nov 17, 2026
·
7 revisions
-
A repository's commands, grouped by the FILE they come from, across 26 filenames and 14 toolchains.
package.json,deno.jsonc,Makefile,justfile,Taskfile.yml,pyproject.toml(poe/pdm/taskipy/hatch),Pipfile,manage.py,docker-compose.yml+3 siblings,go.mod,Cargo.toml,.cargo/config.toml,composer.json,artisan,build.gradle(.kts),pom.xml,mix.exs— each group headed by its repo-relative path. Grouping is not decoration:make buildinpackages/api/is a different command from the one at the root, and a script's relative path only resolves when the cwd is the script's own directory — so the file IS the command's identity. The walk is bounded (depth 4, 200 files) and skipsnode_modules,.git,dist,build,out,.next,coverage,target,vendorby hand:Bun.Glob'signoredoes NOT excludenode_modules(measured on 1.4.2 — the same paths come back with it, without it, and withdot: false), anddist/is not excluded either, so a glob that walked a 200 MBnode_modulesis exactly the failure the hand filter prevents. Hitting a cap setstruncated, which the panel PRINTS — a silently short list reads as "this repository has three commands", a wrong answer rather than a partial one. -
A command file that declares NOTHING is not a group — and is named instead of claimed missing. A monorepo's library packages each carry a
package.jsonwith noscripts, and every one of them used to render as a header with no rows under it; measured on Kabmo's own tree, the listing showed four groups (25 commands) plus six emptypackage.jsonheaders —marketplace/plugins/{command-runner,git-forge,session-info,stats}/package.json,packages/{kabmo-sdk,kabmo-ui}/package.json— which is enough to push the files that do have commands off a 320px panel.scanScopenow drops any group whosecommandsis empty AND that carries noerror(an unreadable file is a fact, not an empty list, so it stays listed with its reason) and reports the dropped paths inCommandListing.empty. The panel uses that list for its empty state:No commands declared by package.json, packages/sdk/package.jsonrather than "No command file found", which would be false — the file is right there. -
A detector OWNS its argv, and its label is
argv.join(' ')— so adding a source is one ROW. The table claimed "adding a source is adding a row" while needing three coordinated edits (the table,labelFor,argvFor), which is exactly the shape where two drift and a row saysnpm run devwhile running something else.Detector.parse(text, ctx)returns{id:'', name, label, argv}fromcmd(name, argv);scan.tsasks the detectorneedsRunnerinstead of testingkind === 'package', andkindRankis derived from the table's own order. The rows are split by family undersrc/server/detectors/(js/make/python/native, assembled intable.ts) andpackage.jsonstays FIRST, where it has always been. A detector may read beyond its own file throughDetectorContext:go.mod's commands are thecmd/<name>DIRECTORIES beside it, Laravel is recognised by theartisannext to acomposer.json, and the Gradle/Maven WRAPPER (./gradlew,./mvnw) is preferred over the machine's PATH because a committed wrapper pins the build's version. Directory listings are memoized per scan.pathsmatches a repo-relative SUFFIX for a file whose basename is too common to claim (.cargo/config.toml— a bareconfig.tomlresolves to nothing).discovery.test.tspins the table's two invariants: no filename is claimed twice, and every detector's label equals its argv joined (fed a MINIMAL VALID sample per source, so a new source has to add one and a sample that lists nothing fails). -
A source whose command list is only knowable at runtime lists the toolchain's OWN verbs, and says so. Cargo,
go,artisan,manage.pyand Gradle have no task file; their real lists need the tool RUN, and the panel executes nothing to build a listing.standardVerbs(prefix, verbs)lists a deliberately short, stable set (cargo 8, artisan 11, gradle 7, maven 7, django 8) and each row's label names exactly what runs. A project's OWN names are read where the file states them ([[bin]],[alias],mix.exs's aliases, atask <name>declaration,[tool.*]tables).[project.scripts]inpyproject.tomlis deliberately NOT read: those are console-script entry points, so a row would fail until the package was installed first. -
A run is started by COMMAND ID, never a command line. The id is
<file>#<kind>:<name>and the server re-resolves it against a FRESH scan to build the argv (src/server.ts→startRun), so a client-supplied shell string cannot reach the route: the RPC surface would otherwise be a remote-command-execution endpoint reachable by anything holding the session cookie. Do not add a "run this string" method.src/server/scan.tsalso owns the only scope validation the plugin can do —rootmust be absolute andrepomust resolve INSIDE it (the check that stopsrepo: '../../etc'); Kabmo's own root allow-list is deliberately NOT re-implemented, because it needs Kabmo's SQLite file and a plugin's server bundle cannot import Kabmo source (@/…does not resolve in it — measured). -
The package runner is resolved in three steps and SHOWN on the row. The file's own
packageManagerfield, then the nearest lockfile walking up to the scope root, then Bun —src/server/package-manager.tsholds the table, andLOCKFILESis the same table as pairs so a walk can ask "is any lockfile here". The resolved runner appears in the label (bun run devvsnpm run build), so the guess is visible rather than implied. -
detached: true+process.kill(-pid, SIG)is the kill, and the exit shape is a SIGNAL. Measured: ash -c 'echo one; sleep 0.2; echo two; sleep 5'spawned detached and killed after 600 ms yielded"one two "withexitCode: nullandsignalCode: 'SIGKILL'. So a killed child has NO exit code, and the run summary carriessignalbeside it — reading a null code asexit 0would report a killed run as a success. A missing binary THROWS fromBun.spawn(Executable not found in $PATH: "…"), so the try/catch is the only path that reports it; a non-zeroexitCodeis a different failure (the tool ran and failed). -
Kabmo's OWN environment never reaches a run, because this plugin's server half runs INSIDE Kabmo's process.
Bun.envhere is the server's, not the user's shell:PORTis the port KABMO listens on (the CLI sets it when it spawns the server) andNODE_ENV=productionis how Kabmo itself was started. Inheriting them madebun run devfrom this panel fail withPort 3001 is already served by Kabmo pid …while the identical command in a plain terminal — wherePORTis unset — ran on 3000; a project's owndevscript would also have come up in production mode. The spawn therefore passesstripKabmoHostEnv(Bun.env, process.platform), and the rule lives in the plugin SDK (packages/kabmo-sdk/src/env.ts) rather than in the plugin or the host, because a plugin's bundle cannot import chamber source (@/…does not resolve in it — measured) while the host's own child spawns (omp/rpc/process.ts,omp/config/mcp-test.ts,omp/session/goal-auditor.server.ts) need the SAME list; a second copy is how the two drift.HOSTis on that list and was missing, which is the second half of the reported failure. The CLI sets it besidePORT(buildServeInvocation), so a panel run inherited the chamber's own bind address — measured through a live chamber started withHOST=127.0.0.1: a run reportedHOST=127.0.0.1while a plain terminal had it unset.bun run dev:lanmasks it (its ownHOST=0.0.0.0prefix is a plain shell assignment and wins), but any script that readsHOSTas a default bound to the chamber's address, and no project owns that variable. The terminal PTY is the third surface and it leaked identically (terminalEnv,lib/terminal/shell.ts): measured, a PTY under a chamber on 3001 reportedPORT=3001 NODE_ENV=production, sobun run devtyped into the terminal panel hit the same "Port 3001 is already served" refusal — andNODE_ENV=productionalso makesbun install/npm installskip devDependencies. It now strips through the same rule before settingTERM/COLORTERM/COLORFGBG, and itsshell.test.tspins thatPORT/NODE_ENV/NEXT_*are gone whilePATHsurvives.NEXT_is a PREFIX, not a name: it is Next.js's whole namespace of build-time-inlined values. The strip is a COPY (the chamber's own env must survive a spawn) andBun.spawn's explicitenvREPLACES the child's environment rather than merging into it — measured. Pinned by a real-spawn test inrunner.test.ts(PORT=[] NODE_ENV=[] PATH_SET=[yes], which fails with the old{ ...Bun.env }restored), and verified end to end through a live chamber: a run started over the plugin's own RPC under a server holdingPORT=4599 NODE_ENV=productionreportedPORT=[] NODE_ENV=[] PATH_SET=[yes]. A fix to a bundled plugin only reaches an EXISTING install through a version bump —syncBundledPluginsis gated on the store'skabmo.versionbeing strictly newer — so this shipped as 1.0.1; the 1.0.0 install would otherwise have kept the bug for good (verified against a copy of a real install:1.0.0 → 1.0.1, rebuilt, rule present). And the bump alone was not enough, because the sync used to run AFTER the server halves loaded.loadPluginServerimport()s the plugin's built bundle, so the copy on disk at that moment is the code the process runs until it restarts — measured on a real install whose boot log reads2 server half(s) loaded (command-runner, stats)immediately followed bysynced command-runner 1.0.0 → 1.0.1: that process ran the PRE-fix half for its whole life, and only the boot that followed a manual restart applied the fix (the log's ownrestarting on port 3001line).src/server/index.tsnow syncs BEFOREloadPluginServers, so the boot that installs a fix is the boot that runs it — verified on a stale 1.0.2 install against a 1.0.3 store: one boot loggedsynced 1.0.2 → 1.0.3then1 server half(s) loaded, and a run from that half reportedPORT=[] HOST=[] NODE_ENV=[] PATH_SET=[yes], withbun run dev:lanlistening on 3000 rather than the chamber's port. -
A run starts with the PATH a terminal would have, because a GUI/launchd launch has almost none. Kabmo started by launchd (the desktop app, a LaunchAgent,
--launch-mode=daemon) inherits/usr/bin:/bin:/usr/sbin:/sbin, soBun.spawnansweredExecutable not found in $PATH: "bun"for every row in this panel — measured in~/.kabmo/logs/kabmo-3001.log(five identical failures) and reproduced withenv -i PATH=/usr/bin:/bin bun -e "Bun.spawn({cmd:['bun']})". The same command in the user's terminal ran fine, because the terminal panel launches a LOGIN shell (-i -l) that re-reads the profile while a plugin'sBun.spawnhas no profile to read. SostripKabmoHostEnvis now followed bywithToolchainPath(packages/kabmo-sdk/src/env.ts), which APPENDS$HOME/.bun/bin,$HOME/.local/bin,$HOME/.cargo/bin,/opt/homebrew/bin,/opt/homebrew/sbin,/usr/local/binand the POSIX defaults to the inheritedPATH— appended, never prepended, so a version manager's shim or a project's.binkeeps winning. The runner also resolvesargv[0]to an absolute path through that samePATHbefore spawning, so the child does not depend on howBun.spawnsearches. Verified end to end underenv -i PATH=/usr/bin:/bin:/usr/sbin:/sbin:listfoundpackage.json#package:hello,startanswered a run id, and the run exited 0 with"$ echo hello-from-script\nhello-from-script\n"; the child's own$PATHstarts/usr/bin:/binand then names the repaired directories. -
The list is TWO collapsible levels, and both use the same reveal. A group header per command FILE (collapsing its rows, carrying the count) and a row per command (collapsing its own output). Both are
.section-revealwith a full-width<button aria-expanded aria-controls>and the body mounted +inertwhile closed — and theinertis the half that matters: without itTabwalks into rows inside a closed group and a screen reader announces them. The group flags are per FILE (commandRunner.collapsedGroups, keyed by repo-relative path) and absent means expanded, the same shape the todo panel uses for its phases — a workspace seen for the first time must show its commands rather than looking like a repository with none. A group's body CONTAINS its rows' bodies, so a flat.section-revealquery mixes the two levels: address each by its ownaria-controls(whichGroups.test.tsxdoes, and which is why its first version failed). Pinned byGroups.test.tsx— the groupinertcase fails when the attribute is dropped (verified). -
The disclosure is DISABLED until the command has run, and the output toggle is GONE. A command with no run has nothing to expand, so its toggle is disabled with
aria-label/titlereadinghas not run yetand a dimmed▸(text-ink/20) — an expandable row that opens onto a placeholder teaches the reader the control is unreliable, and the state has to be readable rather than only hoverable (a disabled control'stitleis not whatgetByRole(name:)resolves, which is how the e2e spec caught it). Once a run exists the row opens ITSELF (an effect keyed onhasOutput), so a Run never looks like it did nothing. Theoutputtoggle was REMOVED: expanding the row already shows the output, so a flag that only decided the row's default was one decision with two controls — and a row that opened itself because a flag was on fought the reader who had just closed it. What remains isbackground, which is a real choice about how a run is TRACKED. A run EXISTS from the moment it starts (the topic carries it withstatus: 'running'and zero bytes), so the gate isrun !== nulland a live run's output streams into its own row — verified:FIRST-LINEpresent at t+1.8s mid-run,SECOND-LINEappended by t+5.8s. -
The panel's type is a three-step hierarchy, and the log sits at the BOTTOM. Group
text-xs font-semibold text-ink(12px/600), commandtext-[11px] font-normal text-ink/80(11px/400), logtext-[10px] leading-[1.35](10px/400), meta striptext-[9px]. The log wastext-xs— the code-block default, a full step LARGER than the label it belongs to — which put the reader's eye on a command's output instead of on the command; measured before/after at 12px → 10px against an 11px label. The same inversion existed one level up (the group wastext-[11px] font-mono text-ink/70under atext-xs text-inkcommand) and both are fixed, sogroup ≥ command > logholds. -
A command's output is a CODE BLOCK that wraps. The Kabmo's own treatment —
rounded-lg border border-ink/15 bg-canvas font-mono text-xs leading-4on the<pre>, which is what.prose-content .code-blockdeclares intailwind.css; a plugin's DOM is not inside.prose-content, so the tokens are written inline rather than the host's stylesheet being imported.whitespace-pre-wrap break-allrather than a horizontal scroll: a build log's long line is usually the interesting one, and a 334px panel with a sideways scrollbar hides it. -
A command is a ROW that expands into its own output. The shape is the git panel's
StashSection:.section-reveal(grid-template-rows: 0fr → 1fr), a full-width<button>carryingaria-expanded/aria-controls, and the body left MOUNTED andinertwhile collapsed so the reveal animates without leaving a hidden control tabbable. Each row carries the disclosure, a background toggle ([⏱]) and Run/Stop ([▶]/[■]) — the last two icon-only, drawn as inline SVG because the kit has no icon dependency and alucide-preactimport would bundle a whole set for three shapes.Backgroundwas one of two panel-wide CHECKBOXES setting the defaults for every run; it is now a per-command<button aria-pressed>toggle, becausedevwants a job andlintdoes not, and one pair of checkboxes cannot say both. TheOutputtoggle is GONE: expanding the row already shows the output, so a flag that only decided the row's default was one decision with two controls — and a row that opened itself because a flag was on fought the reader who had just closed it. Three behaviours are load-bearing and each was a defect first: a Run OPENS the row (the first cut ran the command and left the expansion shut, so a successful run looked like nothing happened — verified in a browser); Run is never disabled (it was gated on the old enablement flag, which made a command you do not want to WATCH unrunnable); and the run'scommandIdis what a row matches on — neverfile+label, which collide for two commands of the same name in one file. Turning the background toggle OFF stops that command's runs (stop-all, session-scoped), because a toggle that says "not a job" while the job runs is a lie.Row.test.tsxpins all of it, and the open-on-run case fails with the fix reverted (verified). -
The topic publishes on STATE immediately and on OUTPUT throttled.
byteshas to move for an open log to re-read, so a growing buffer publishes at most once per 250 ms per run — the payload carries a byte COUNT and never the bytes. Two numbers travel, and they answer different questions:bytesis everything the process produced,ringBytesis what the 256 KB ring still holds, so the view can say "the last 64 KB of 3.1 MB" instead of presenting a window as the whole log (src/server/ring.tsis the pure half — the ring,ringText,stripAnsi). -
The force-stop on a repo switch is three mechanisms, because each alone has a hole. (1) A
contentScriptwatches the shared scope for as long as the plugin is enabled — a plugin PANEL is unmounted while another view is on screen (WorkspacePanelsreturnsnullfor an inactive plugin), so a switch made from the Files panel would otherwise leave processes running with nothing to notice; the script renders nothing and uses the kit's SERVICES rather than hooks, because a content script is not a Preact component. (2) The panel sweeps on mount, which covers a reloaded Kabmo and a phone (which mounts no content script until the mobile layout mountsPluginBootstrap). (3) Every run records itsscopeKey, so a sweep reaches runs started before a watcher existed.stop-othersis defined by the scope it is HANDED — it kills this session's runs in any OTHER scope — so calling it twice is a no-op, which is why the watcher fires on every notification instead of tracking the previous scope. Session-scoped on purpose: two sessions legitimately hold two repos. -
The SESSION travels with a run, and that is load-bearing.
stop-othersmatches onsessionId, so a run recorded againstnullis never matched by a watcher sweeping a real session — measured as a background job that survived a repo switch whilestop-othersansweredstopped: 0. The panel sendsusePanelInfo().sessionId, and the mount sweep sends the same. -
A callback that depends on an
useRpcresult loops.useRpcreturns a fresh state object per render, solist.callis a new function every render; putting it in the scan callback's dependency list re-runs the scan on each render and the scan's ownsetStaterenders again. Measured: hundreds oflistrequests in seconds, which also starved the render so the command rows never appeared. The plugin holds the call in a ref and keys the effect on the SCOPE pair, which is the real trigger. -
The registry is per load, and
onDisposekills everything. A run is a detached child and a detached child outlives its parent by definition, so disposal is what keeps a Kabmo restart from orphaning a dev server — and Kabmo's shutdown path calls it (disposeAllPluginsOnShutdown, bounded so a hanging plugin cannot hold the port).stopalso PUBLISHES immediately rather than leaving the state tofollow: the reader clicked Stop and must see the row leaveRunningat that moment. -
Its tests are
*.test.tsunder the plugin (bun test marketplace/plugins/command-runner/), and the runner's are driven against REAL processes: a fakeBun.spawnwould prove nothing about group kills or exit codes.tests/e2e/specs/commands.e2e.tsis the assembled proof — install through the real route, list a fixture repo, run a command whose effect on DISK is the assertion, read its output, and switch repo to see a background job's process disappear.
-
omp's
asktool takes ONE HTML<form>since 18.18.3 ({ html }), notquestions[], and the RPC host has noformDialog.RpcExtensionUIContextomits it, soAskTooltakes its field-by-field branch: one blockingselect/input/editorper NAMED control, titled with the question omp derived. That derivation isfieldQuestionsinpi-tui(html-form/data.ts): the control's own<label>, else the text block right before it, else its<fieldset><legend>, else a lone option's label, else the control name — and radio/checkbox groups of two or more gain anOther (type your own)row.shared/lib/chat/ask-form/mirrors it because the browser cannot importpi-tui; it is what keeps every question on the card instead of falling back to raw text. A top-level<fieldset>starts its own section, so a paragraph above it does NOT caption the fields inside — the legend does. Measured against omp's ownparseHtmlForm/fieldQuestionson the tool's example form (<p>context, then<fieldset><legend>Session store</legend>): borrowing the paragraph gaveSessions live in memory…where omp titles the dialogSession store, the title walk found no owner, and the firstselectfell through to the MODAL (which has no ask body) instead of the card. The parser now resets the caption at a top-level fieldset and was cross-checked field by field with omp's derivation on seven shapes. -
The question TEXT is the claim key, so the mirror must match
fieldQuestionsexactly — measured drift is what put an ask in the modal.splitAskFramesclaims a per-fieldselect/input/editorby its title, and onlymethod:"ask"frames are excluded from the modal outright. Scanning 1,725 real session files (7askcalls) found 2 whose derived question text differed from omp's, and both rendered as a modal: a<label>wrapping a<select>leaked every<option>label into the question (textOfskipped the tag but not its content); an unclosed<span class="truncate">written literally inside a code span madematchingCloseanswer end-of-document, so the rest of the form was walked twice and every field duplicated. Also fixed against omp: inline text before a control (<span>,<br>) now captions it (flush()runs before the field is built, not after), a<table>holding controls is walked as layout instead of dropped, and a lone checkbox with novalueasks its NAME rather than the submittedon.ask-form.test.tspins each shape. The routing also gained a second key: aselectwhose title matches nothing is claimed by its OPTION ROWS (exact set match, ≥2 labels, gate excluded), so a future parser drift degrades to the card instead of the modal. -
The result is
details.answers[]—{ name, question, answer }— plustimedOut, and the same data is echoed asUser answers:\n{json}in the tool text.answeris rendered as omp'sformAnswersdoes: an option's LABEL,Other: <typed>, and ", "-joined labels for a checkbox group. Kabmo aligns by controlnameand reads the JSON out of the text when the livetool_execution_endframe dropsdetails. -
A
selectresponse must be a label omp OFFERED, or the whole ask is cancelled.askChoiceresolves a picked row withlabels.indexOf(outcome.value); a typed answer matches no index and answersundefined, whichcancelAskturns into a cancelled tool call. Kabmo used to hide the "Other (type your own)" row and send the typed text in its place — measured as broken on 18.18.3. The card now sends the row itself; omp opens a follow-upinputtitled with the SAME question, which lands in that question's group (askQuestionForTitlealso tolerates thequestion (Enter a number)suffix of a rejected text answer). -
The grouped dialog (
method:"ask") is extension-only now.set_ask_dialog {enabled:true}(sent byconfigureChild) is unchanged and still answered by one{answers:[{id, selectedOptions, customInput}]}reply, but omp 18.18.3 no longer routes its OWN tool through it — extensions and the ratchet still do, and an older child still takes that path for the tool.GroupedAskrenders it with oneSubmit answers. Verified on 18.8.3: two questions including amulti:trueone arrived in one frame. -
A grouped frame carries NO
title, so the title walk cannot place it.splitAskFramesclaims it by the question IDS omp puts in both the frame and the tool call's arguments — the same keyparseAskQuestionsreads — and places the SAME frame on every question it names, because one dialog answers all of them. A grouped frame naming no open question is an inline orphan, never modal material. -
A multi-question form is answered ONCE, even though the wire is per field.
FormAskdraws every question with its own control and oneSubmit answers; the submit then walks omp'sselect/input/editorframes as they arrive, one answer per frame, so the agent still receives the per-field responses it expects. A multi-select is reconciled against the frame's owncheckedIndices(a form may mark a rowchecked, and sending that label would toggle it OFF) and ends with theDone selectingrow. A rejected typed answer gets three attempts before the card unlocks and says so. -
A default-checked multi option is drawn as selected, not empty.
parseAskFormnow carries<input checked>intoAskOption.checked;FormAskseeds its picks from it anduseAskDraftsseeds the old per-question display from the frame'scheckedIndices. Without either, the first click SENT the label and omp toggled the default OFF while the card showed it selected. -
No ask dialog is modal material, in any state. A per-field frame that names a question of a known ask but no OPEN card owns it (its call failed, was answered, or is outside the loaded window) is drawn as an inline
LooseFieldAsk/orphan row. A frame that matches neither title nor rows is still owned by the only open ask when its title shares a content word with one of that ask's questions — the ask tool is exclusive, so nothing else can be asking — andFormAskconsumes it as the live field. A picker with no shared word keeps the modal. The modal has no ask body and can only produce an unanswerable panel. -
Both halves must ship together. Enabling
set_ask_dialogmakes omp send a frame the client cannot otherwise answer, which would block the agent with nothing on screen to answer it; the opt-in, thequestionsfield onExtensionUiDialogRequest, theanswersresponse variant, the split's id matching andGroupedAskare one change. -
omp's
descriptionfor a choice is VISIBLE text on its row, and both shapes draw the row through one component (OptionRow). omp's ownaskprompt puts the tradeoff there ("short labels, tradeoffs indescription"), so it is half of what the user is deciding between. The grouped card rendered it astitle={option.description}— a hover tooltip — while the per-questionselectloop (FrameControl) printed it, so the two shapes of ONE tool asked the user to pick blind vs. informed, and a phone could never hover at all. The row is now shared (OptionRow.tsx: mark, label, description,suggestedbadge, the multi-select "Done" emphasis), which is what makes the drift impossible rather than merely fixed;index.test.tspins the description as visible text and the absence of thetitleattribute, andask.e2e.tsasserts it on the real card.
-
Over RPC the approval gate is a
selectframe, NOT aconfirm. omp's RPC UI context (RpcExtensionUIContext) has noapprovemember, sorequestApprovalfalls back to itsselectbranch (approval.ts:if (ui.approve) … else ui.select(full, approvalChoiceLabels(choices))). The gate therefore arrives as aselectwhose TITLE is omp's whole prompt, newline-separated, and whose OPTIONS are the choices — measured against 18.13.1: title"Allow tool: read\nReason: Restricted folder: /tmp/secret\nPath: …", options["Approve", "Deny"].shared/lib/chat/omp/approval-gate.tsowns that one reading (isApprovalGateFrame/parseApprovalPrompt), because the title prefix is the ONLY thing that separates a gate from anaskquestion's ownselect. -
A gate is never claimed by an
askcard. Both areselectframes, andsplitAskFramesclaims aselectby its title — but a gate's title names no question, so it fell through to the "last ask spoke" walk and landed on an unrelated QUESTION's card, where "Approve"/"Deny" rendered as that question's answer options and the answer was posted to the wrong tool call (reproduced: the card claimed["f1", "g1"]). A gate is excluded from that fallback exactly like aconfirm, and reaches the modal instead —ask-frames.test.tspins it. -
The thing being approved must be ON SCREEN. A title is a ONE-LINE field and the dialog's header rendered it with
truncate, so the reason and the path were clipped out of the only element that could show them: the gate read "Allow tool: read" over a path the user never saw.parseApprovalPromptsplits the prompt into its tool, omp's reason line and the tool's own detail rows;ApprovalBody.tsxdraws the reason and the details in full, and the header names the TOOL ("Allow read") instead of repeating the prompt. "Approve" without the thing being approved is not a decision. -
A gate has NO free-text field. The dialog's "Other — type your own answer" is an
askquestion's escape hatch; on a gate omp's answer parser (approvalAnswerForChoice) reads any string that is not one of its labels as a DENY — measured:"Approve"→ allow,"yes please"→ deny. So the field was a way to REFUSE the call by typing near-miss text and never a way to approve it. A gate draws no field, and the submit path sends the chosen label rather than a typed answer. -
tools.restrictedFolders(omp 18.13.1) is the gate's new trigger. Every read, write, edit, search or command on a listed folder asks in EVERY approval mode —yoloincluded — and no remembered grant, session approval or ACP "Always allow" covers it (measured against omp's own resolver:promptwith sourcerestrictionandoverride: truein all three modes, and no session-grant option). The composer'syolocopy says so ("Everything runs without asking — except a restricted folder, which always asks"), because a mode picker promising an unconditional bypass would be lying about the mode it names.
-
The list is oh-my-pi's, and its only durable home is the session transcript. There is no todo file and no chamber-side copy — a second copy would drift from the one the agent rehydrates, and a plan panel that disagrees with the agent is worse than no panel.
todocalls commit a full snapshot to the entry they append (message.details.phaseson the toolResult, ordata.phaseson auser_todo_editcustom entry), and every branch rehydration — resume, rewind, fork,/btw— reads the DEEPEST such snapshot off the ACTIVE BRANCH back out of it (omp'sgetLatestTodoPhasesFromEntries→syncTodoPhasesFromBranch).src/shared/lib/chat/todo/snapshot.tsperforms that same read: branch walk byparentIdfrom the last entry, newest-first, skippingop:"view"results (they echo the list without committing it) and errored ones. -
Read path is
readSessionTodosbehind a realtime topic, and no omp process. Thetodostopic resolver (src/server/lib/realtime/topics/session-data.server.ts) callsreadSessionTodos(src/server/lib/omp/session/todos.ts) →findSessionFileById→ full JSONL parse, cached by (size, mtime) onglobalThis. Measured on real sessions (7.2 MB / 1905 entries): ~15 ms parse, 0.02 s cached round trip. A full parse is deliberate — the todos may sit megabytes from EOF (measured: 2.7 MB from the end of a live session, andNonein another), so a bounded tail window would report "no todos" for exactly the sessions that have the most. The panel never spawns anompchild: that would fight the chat's own session wrapper for the same session file. -
The read rides the session's own
todosrealtime topic, so there is no poll.session-data.server.ts'stodosDescriptorresolvesreadSessionTodoson demand and the server republishes the topic on thesession-data-dirtysignal, which the chat emits at every turn boundary — i.e. right after eachtodocall.TodoPanelsubscribes throughuseRealtimeTopic(sessionTodosTopic(sessionId)); the panel's own Refresh calls the topic'srefresh. Thesession-todos.tsclient hook and itsomp:session-updated/TODO_REFRESH_EVENT_THROTTLE_MShand-rolled event path are gone with it. -
Follows a live agent from outside Kabmo (verified): with another
omp -pprocess driving a session, the panel went0/3 done · 1 in progress→1/3 done · 2 blockedand rendered the blocker notes, purely off the topic republish. Within Kabmo the same path makes it immediate. -
Five statuses, not three. omp's vocabulary is
pending | in_progress | completed | abandoned | blocked; the chat timeline's older tool card only ever drew three, so ablockedtask rendered as an ordinary pending one.progress.tsowns the status → presentation table (icon, tone, active/closed) andtodoProgresscounts closed = completed + abandoned — the pair omp's own HUD hides as settled, because leaving an abandoned task in the denominator makes a list read as permanently stuck. Ablockedtask'sblockernote is rendered under its content; it is the only place omp records WHY it waits. -
The chat's
todotool card is a different thing and stays separate.src/shared/lib/chat/todo/parser.ts(moved fromchat/todo-parser.ts) parses what ONE call did from its text output for the timeline card. Merging them would attribute every other call's work to whichever card was on screen; the two files are documented as the distinction. -
Empty states are distinguished because they mean different things: no
sessionId("No session selected"), a transcript with no snapshot at all (the agent never planned here), and a list whose every task is closed (renders normally, 100% bar). Collapse state per phase is persisted undertodo.collapsedPhases(verified surviving a reload). -
enabledis deliberately NOT the workspace gate the other panels take. That flag means "the active session's cwd resolves to a registered workspace folder", which files/search/git/terminal genuinely need. A todo list lives in the session's own transcript, so a session running outside every registered workspace still has one — gating on it showed "No session selected" over a full list (measured, both desktop and mobile). The desktop view therefore takes onlyactive; the phone's drawer keeps its whole-drawer gate for the workspace views but exempts thetodotab.TodoPanelitself answers "No session selected" when there is nosessionId. -
Mock mode returns a deterministic six-task list covering every status (including a
blockedwith a blocker note and anabandoned) so all render shapes are exercised underMOCK=true. The demo lives insrc/server/lib/omp/session/data-mock.ts, called by thetodostopic resolver — NOT in an HTTP route, because the panel reads the topic and a demo reachable only over HTTP would leave the view empty under MOCK.
-
The view sits beside Source Control in the activity bar, on both layouts, because a wiki is read off the same remote through the same repo pick — one pair in the bar rather than one at each end. The position is not restated in the two components: they render the merged panel catalog, whose built-in half is ordered by
RIGHT_PANEL_TYPES(the desktop bar, the desktop panel stack and the phone's tab bar all read it), so moving one row moves every surface. -
A wiki is read over git, not over an API, and that is why one panel covers GitHub, GitLab and a self-hosted GitLab. Both hosts publish a project's wiki as a SEPARATE repository at
<origin>.wiki.git, sosrc/server/lib/wiki/remote.tsappends the suffix to the checkout's own remote and the fetch authenticates exactly the way the checkout does — no token scope, no API version, no per-host branch. Verified end to end ongithub.com/jgraph/drawio(19 paths,[[Embed Diagrams]]gollum links, images) and ongit-rbi.jatismobile.com/jns6_5/drrealhandler(7 paths, 0.7 s cold,_sidebar.mdand.gitlab/redirects.ymlcorrectly kept out of the nav). The provider name the header shows is a LABEL: it picks the "open on the host" URL (/wiki/Pagevs/-/wikis/Page) and is decided by name forgithub.com/gitlab.com, otherwise by probing/api/v4/versiononly after a wiki fetch has already succeeded (so the common failure path never pays for it). -
The mirror is one bare, shallow clone per wiki, cached on disk under
<data>/wiki/<host>__<slug>, TTL'd 60 s in memory (mirror.server.ts).HEAD:refs/wiki/latestis fetched directly, so there is no working tree to keep in sync;--depth 1keeps a changelog wiki's history out of the cache. Two details are load-bearing:--no-write-fetch-headplus a refspec (rather than a named remote) keeps the credential-carrying URL out of.git/configandFETCH_HEAD— verified, neither file mentions the remote the fetch used — and the cache key is host+slug rather than the URL, so anhttpsand ansshspelling of one remote share a mirror. The cache itself hangs offglobalThis(__kabmoWikiCache) for the same reason the database handle does:bun --hotre-evaluates the module while the mirrors on disk stay. -
Every
gitcall is an argv spawn, never a shell string (src/server/lib/wiki/git.ts). A wiki path is author-chosen and does hold spaces (Setting-up-a-OneDrive-project-to-use-with-diagrams.net.md), and a checkout path is user-chosen; there is no shell to escape them against.GIT_TERMINAL_PROMPT=0rides on every call, because without it a private wiki blocks on a credential prompt with no terminal to answer it and the read hangs to its timeout instead of reporting that the wiki is not readable. -
A missing wiki is an ANSWER, not an error. Git says "Repository not found" / "Authentication failed" / "could not read Username" for a wiki that does not exist and one Kabmo cannot read, and both mean the same thing to a reader — so they map to
reason: 'no-wiki'and the panel words it, rather than reporting a failure. The other three reasons are distinct and separately worded:no-remote(the checkout has noorigin),unsupported-remote(a local path, a bare host — anything the suffix cannot hang off),unreachable(timeout, network, git missing). All four verified against the API. -
A page is read at the ref, never off a path —
git show <ref>:<path>can only name a blob in the wiki's own tree, so a crafted../../../../etc/passwdreturns "Page not found" (verified) rather than reaching the filesystem. Pages travel as markdown SOURCE (/api/wiki/page); the panel renders them through the app's own pipeline, which is what gives a wiki page the same sanitizing, Shiki highlighting, KaTeX and mermaid hydration the chat timeline has — verified live on a real wiki whose Home carries a ```mermaid diagram and four fenced blocks. -
A wiki's images are in the wiki's repository, so the panel serves them itself (
/api/wiki/asset, bytes read withBun.spawn— the text runner would turn a PNG into replacement characters). The response carriesnosniffand asandboxCSP, which is what keeps an SVG in that author-controlled tree from running script if a reader opens the asset URL directly; verified: a 455×349 PNG and its SVG twin both render inline on the page.getImageMimeTypedeliberately excludes SVG (the editor's viewers treat it as text), so the route namesimage/svg+xmlitself. -
The nav is the wiki's OWN
_Sidebar.md, not a tree derived from the file layout (src/shared/lib/wiki/sidebar.ts). Both hosts serve that file as the navigation around every page, so it carries the author's grouping, order and labels: the GitLab wikis here group### 📚 Navigation/### 📋 Changelogs/### 📊 Infowith labels like🏠 Homeand a**Version**: 1.6.0note block, all of which a folder-derived list turns intoNAVIGATION/CHANGE_LOGSin a different order. The parser is deliberately tolerant — a rule instead of a heading, a nested bullet, a link with a"title", and a prose block are all in real files. A page the sidebar omits is appended underOther pagesrather than hidden (withRemainingPages): the sidebar is the author's navigation, not an index, and the panel has no address bar — measured onjns6_5/personalschedulertrigger, whose sidebar lists 12 of its 26 pages, the panel renders all 26. A wiki with no sidebar at all (github.com/jgraph/drawio) falls back tosectionsFromEntries, which groups by folder so the panel is never un-navigable. Verified in the browser: the sidebar's own groups and labels render, clicking🧪 Testing Guideopens that page in-panel witharia-currenton the item, and no tab opens. -
Three provider conventions are encoded in
src/shared/lib/wiki/pages.ts, because each is invisible in the raw markdown and each was wrong in the first cut. (1) Chrome fragments —_Sidebar/_Footer/_Header, any case — are not pages; listing them puts a nav fragment in the middle of the nav._Sidebaris the one read back as navigation (above);_Footer/_Headerare simply dropped. (2) References are case- and space-insensitive:[[Embed Diagrams]]targetsEmbed-Diagrams.md(gollum's space→dash rule), GitLab's[v1.6.0](change_logs/v1.6.0)omits the extension, and GitHub's own wiki resolves/wiki/eMbEd-Diagrams— so resolution tries the written path, the extension form, the dash form of both, and matches case-insensitively. (3) Assets are entries too, or a page'shas nothing to match. -
A bare path is resolved from the wiki ROOT first, then from the page's own folder — and only
.//../means "beside this page". That order is not a coin flip: it is what both hosts do, and it is the difference between a working link and an inert one on a nested wiki. A real GitLab wiki writes[TRD v1.3.3](trd/v1.3.3/home)fromtrd/v1.3.2/home.md— rooted at the wiki, while page-relative resolution looked fortrd/v1.3.2/trd/v1.3.3/homeand found nothing. Measured onjns6_5/personalschedulertrigger: 25 of its 41 links failed to resolve, and every one of them then opened a browser tab (the click handler classified them fromlink.href, which the DOM always absolutises, so a relative path read as external). After the fix the same census is 41/41, andjns6_5/drrealhandleris 34/34. -
Gollum's
[[Page]]is expanded BEFORE the markdown parse, and its destination is percent-encoded.[[x]]is invisible to a markdown parser (it renders as literal brackets), soexpandGollumLinksrewrites it — leaving fenced blocks and inline code alone, or a page documenting the syntax gets its example rewritten. The encoding is the second half of the same bug: a bare[Embed Diagrams](Embed Diagrams)is not a link at all (a markdown destination cannot contain a space), so marked emitted the brackets as text and the whole Home page of a real wiki rendered unlinked; measured in the browser before and after (links: [Deploying, Translations]→[Deploying, Translations, Embed Diagrams, Getting Support]). -
The panel renders the chat's
MarkdownRenderer, in a third mode (wikiScope).documentmode was already the "the source IS the document" contract; wiki mode adds gollum expansion and resolves references against the wiki's tree — a LINK to a page becomes in-panel navigation (data-wiki-path→onWikiNavigate), an IMAGE goes to/api/wiki/asset, and a link to any OTHER file in the wiki keeps that asset URL with no marker (copyable, middle-clickable, inert on a plain click — the panel is a reader, not a file browser). A reference that resolves to nothing is left exactly as written. -
The click handler classifies a wiki link from the RAW attribute, never
link.href.hrefis always absolutised by the DOM (/trd/v1.3.3/homereads ashttp://127.0.0.1:7799/trd/…), so a relative path that named no page was indistinguishable from an external URL and opened a tab. Only anhttp(s):raw href leaves the console; a bare#anchoris left to the browser, because the heading it names carries the id the wiki's own table of contents wrote (see below); anything else is inert. -
Headings are given the id the page's own anchors name (
wikiHeadingSlug, applied byrewriteHeadingIds). Both hosts slug a heading by lowercasing it and dropping everything that is not a letter, digit, combining mark, space, hyphen or underscore, then turning spaces into hyphens — so## 🎯 Overviewis#overviewwhile## ⚠️ Migration Queriesis#%EF%B8%8F-migration-queries, the symbol dropped and the U+FE0F mark after it kept. The renderer's own id keeps the emoji, so every TOC entry pointed at an element that did not exist and clicking one did nothing. Verified over all three cached wikis: 9/9 anchors resolve (7 of them emoji-headed), and a live click scrolled the page from 858px to 0 with no new tab. -
wiki.selectedPageis stored WITH its scope ({ scope, path }, scope =root�repo), the same ruleworkspace.activeRepofollows: a page path from another repository names a page this wiki does not have, so restoring it would open a 404. The stored path is used only while it still exists in the current wiki, else Home, else the first page — a wiki whose Home was renamed still opens on something readable. -
The nav sits on the RIGHT and the page keeps the panel's leading edge (
@[520px]:flex-row-reverse), so the wiki reads as a menu beside the document rather than a sidebar before it. The reverse is visual only — DOM order stays list → page, and the divider moves to the list's leading edge (border-l). -
Layout is two columns above 520px of PANEL width; below it the DESKTOP column keeps its drill-down and the PHONE gets a floating button plus a modal (
@containerfor the column break, but the phone/desktop split comes from thelayoutfield onPanelBodyProps— the two shells can be the same width, so neither a container nor a media query can tell them apart). Measured in the browser after the move: at 575px the nav is 208px atleft 1348beside a 367px page atleft 981; the default right panel resolves to 420px, so the desktop's narrow state is the list replacing the page, and selecting one gives the page a back arrow (@[520px]:hidden, so the two-column layout never shows it). On the phone the page is the ONLY screen — instead of the drill-down, an outlined circular trigger floats over its bottom-right corner and opens the sameWikiNavin the sharedModalshell; the backdrop or Escape closes it, choosing a page closes it, and a wiki with no links has no trigger. Measured at a 500×757 phone viewport: the trigger sits 36×36 atleft 452, top 709, the modal 384×282 centered atleft 58, top 238, and choosingGetting-Startedclosed it and moved the header toGetting-Started.md. The page list is grouped Home → root pages → one group per folder, and filtered by a search box. - MOCK=true answers a deterministic demo wiki — a page with a table, a mermaid fence, a TS fence and an internal link, plus a tree that exercises the folder grouping and the chrome/metadata filters — so every render shape works without an omp install.
Using Kabmo
How it is built
- Architecture
- Runtime and toolchain
- App shell and layout
- Chat stream and tools
- omp engine and settings
- Plugins, skills and automation
- Desktop integration
- Workspace panels
- Providers
- Harnesses
- Tool panels
Shipping it
History