Changelog
[Unreleased]
[0.15.14] — 2026-12-03
Changed
- What was experimental is part of Keg. Workspaces, the connector door, previews, a workspace's git remotes, the SSH door,
keg setup server, model providers of your own, the vault's uses by hand, mail and its sender's verdict, webhooks, an organisation's tools, member roles,keg app check, self-hosting, public services and building on the node a service runs on (remote-builds) are on on every node, with nothing to turn, and their commands and pages are there for everyone. None does anything until it is used.keg settings experimental on NAMEfor one of them says so and changes nothing;offis refused. Onlyaccountsis experimental still. A node where a person had turned one of them off keeps it off, listed, until they turn it on. See docs/EXPERIMENTAL.md. - How a Mac's VM sleeps is two ordinary settings, where
quiet-sleepanddeep-sleepwere experimental:keg settings sleep quiet|deep on|off, the Mac app's Settings under General, and the console's Keg services page. Each is as the node had it, off unless you turned it on. - Keg Cloud: one Nodes page. Instances and Nodes were two pages that showed an instance twice; there is one, with the instances Keg Cloud runs (each with what its node says of itself) and your own computers.
Added
- A Coding agents page, in the Mac app and the console: which of Claude Code, Codex and Pi are on this computer, which have Keg's tools (its MCP server) and which have the Keg skill, with a button for each that is missing.
keg agents --statussays the same as JSON. - Volumes say their size, in
GET /v1/volumes(size, measured at most once a minute), the Mac app and the console; and pressing a volume or a network shows it in full under its list. - The sidebar shows the disk beside the memory, in the Mac app and the console.
Fixed
- Removing unused images no longer stops at one a release still needs. A name a release or a machine is held to was listed as unused, the node refused to remove it ("is the name a release or a machine is held to"), and the Mac app stopped there, leaving the rest. The node now says which names are held (
heldon each image), the console and the Mac app count them as in use and do not offer to remove them, and a removal of several carries on past one that is refused. - Mac app: Share in Sharing opens its sheet. It did nothing. With no other node, or nothing running that has a port, the sheet now says so, where the button was greyed out.
- A Compose project whose containers have gone says so, and is run again from its file: it showed "0 of N running" with nothing to press.
- Mac app: the sidebar no longer shows a section twice as the node says which features are on (Images appeared twice).
keg cloud connectleaves what is yours. An instance named after an environment or a node you already have (production,local, another server) is refused, where connecting it replaced yours.- Keg Cloud: an instance that can no longer be connected says so, in red, on its panel and on the list, with the one thing to do (replace it), where it showed commands that were refused.
Experimental
accounts: who is signed in is shown, and your instances are in Keg. The console (keg ui) and the Mac app show who is signed in in the corner of the window, with signing in and out and a way to Keg Cloud. A new Cloud section lists the instances Keg Cloud runs for your account and your teams, with their state: one press connects an instance as a node and an environment here (whatkeg cloud connectdoes), another opens Keg's console for it. An instance that can no longer be connected says so. On the command line,keg cloud ls --jsonlists them for a program, andkeg cloud console NAMEopens an instance's console.
[0.15.13] — 2026-12-03
Experimental
remote-builds: a service is built on the node it runs on, when that node's processor is not this one's.keg up --env NAME, where NAME lives on another node with another processor (an Apple silicon Mac to an x86 server), sends the folder there; that node builds it and deploys it. The same command and the same keg.yaml. What the folder's.dockerignoreleaves out is not sent. The same processor: built here and the image sent, as before. Turned on at both nodes. The whole folder is sent each time, up to 2 GiB and 200,000 files; a build that is handed secrets from the vault is built on this node only; a link that points out of the folder is refused by the other node.
Changed
- Keg Cloud: x86 instances. A plan can be met by the x86 machine of its size where no ARM one is to be had. Offered only where Keg Cloud is told to offer it and with a Keg that builds what it is sent (this release); the ARM machine is made where both are in stock. See docs/KEG-CLOUD.md.
[0.15.12] — 2026-12-02
Fixed
- A program that is not root can open its own output again by name, as it can on Docker: an image like
nginxinc/nginx-unprivileged, whose logs are links to/dev/stderr, was refused ("Permission denied") and ended as it started. Its output now goes through a pipe that is its user's; the node's own file of the log stays root's.
Changed
- An image mirror on the node's own machine is reached without TLS:
KEG_DOCKER_MIRROR=127.0.0.1:5000(orlocalhost) names a cache kept beside the node, as a registry on this machine already is. Any other mirror is reached over TLS as before, and what arrives is checked against its digest either way.
Added
- An invitation good for a number of days:
keg node invite NAME --days N(1 to 365; a year if not said). One that has run out is refused by the node. - A way in to a Keg Cloud instance runs out and is renewed: on an instance made with this release a way in is good for a week;
keg upasks Keg Cloud for a new one when less than two days are left, for as long as you may use the instance. - Keg Cloud: a coding environment for ChatGPT, Claude and Grok. A new instance has Keg's connector door at
https://mcp.NAME.runkeg.dev/mcp; who is let in is decided on the instance's panel at cloud.runkeg.com, by the code each app shows. See docs/KEG-CLOUD.md. keg cloud newandkeg cloud rm(experimental, underaccounts):keg cloud new [NAME]makes an instance of your own at Keg Cloud, waits until it runs and connects it, so thatkeg up --env NAMEis the next command;--size,--region,--teamand--no-waitsay otherwise.keg cloud rm NAMEremoves one. Only for an account Keg Cloud has turned making instances on for.- Keg Cloud: making one's own instance. Where it is turned on for an account or a team (at Clerk,
{"instances": true}), its Nodes page offers a new instance, within the number an admin allows (one until said), and removes it by its name. See docs/KEG-CLOUD.md.
[0.15.11] — 2026-12-02
Added
- Public services (experimental,
public-services): a service whose definition sayspublic: trueunderrunis answered to the world over HTTPS at a name of its own under the node's public name (https://SERVICE.<node's name>), from its deploy there until a deploy that no longer says so. Only on a node started with--public-domain; the certificate is got as a share's is. Nothing is public that does not say so. - A member's invitation:
keg node invite NAME --memberissues a person's invitation that cannot issue, list or withdraw invitations, or change whose node it is or how it is set. For someone who uses a node that another decides who is let in to; not a wall, since a member still runs containers.keg node invitationssays which are a member's.
Changed
- A node keeps at most 200 invitations. The next
keg node inviteis refused until one is withdrawn, so that the list of them can always be read by whoever must decide which to withdraw. - Keg Cloud: teams. An instance is for an account or a team. A team's members connect to its instances, each by a way in of their own (a member's, on an instance made with this release), its admins stop and start them, and when someone is taken out of the team every way in is withdrawn within minutes and those who remain connect again. Who is an admin of Keg Cloud is said at Clerk. See docs/KEG-CLOUD.md.
[0.15.10] — 2026-12-02
Added
keg cloud(experimental, underaccounts):keg cloud lslists the instances Keg Cloud runs for your account, andkeg cloud connect NAMEmakes one a node and an environment on this computer, to deploy to withkeg up --env NAME; the way in is collected from Keg Cloud once and never written down.keg cloud adoptis for a node made for an account: whoever installs it gives it its owner and its place on their list, once (PUT /v1/account/listing, refused by a node that has an owner).- Keg Cloud can make instances, for its owner alone: an admin section (Servers, Instances, Record) that exists only where admins are named, and answers anyone else as if it were not there. An instance is a machine of its own at a provider (Hetzner Cloud), behind a firewall with no SSH, with a name under runkeg.dev; at most 3, of the two smallest sizes. See docs/KEG-CLOUD.md.
[0.15.9] — 2026-12-01
Added
- Keg Cloud has an interface of its own at cloud.runkeg.com: Overview, Nodes and Team, and a landing that leads with one command.
keg account loginis the whole of signing up: it opens the browser, makes the account, turns accounts on for the node, and puts the node on the account's list, where it appears by itself. A node on the list tells Keg Cloud every five minutes that it is there: its name, Mac or Linux, Keg's version and how many containers it has, and nothing of what they are;keg account logouttakes it off. Only a node whose owner signed in tells Keg Cloud anything. - The node knows who its owner signed in as (experimental,
accounts):keg account loginhands the node the sign-in, and the node checks it itself (its signature against the keys Keg's sign-in publishes, that it was made for thekegcommand, that it has not run out) and keeps who it is for, never the token. The console (Keg services) and the Mac app (Settings › General, with Sign In and Sign Out) show it;keg account whoamisays whether this node knows you. Nothing is allowed or refused by it yet.GET,PUTandDELETE /v1/account, a person's only.
[0.15.8] — 2026-12-01
Added
- Keg accounts (experimental,
accounts):keg account loginsigns the command line in to a Keg account in a browser;keg account whoamisays who is signed in, as Keg Cloud's server confirms it;keg account logoutsigns out. An account is optional. The sign-in is kept in~/.keg/account.json, readable by its owner alone, and no password is seen by Keg. The site is at runkeg.com, accounts at cloud.runkeg.com; the app's update address and the cask name runkeg.com from this release (earlier copies keep asking keg.rahultrikha.com, which still answers). See docs/KEG-CLOUD.md. - Self-host (experimental,
self-host): a list of open source apps to run on your own node, in the Mac app, in the console (Containers mode in both) and askeg selfhost. Seven to begin with (Vaultwarden, AFFiNE, Super Productivity, Memos, Uptime Kuma, Excalidraw, Actual Budget); each is installed with one press, given a port and its secrets by the node, and opened atNAME.keg.localhost. An app is a recipe, a Compose file with anx-kegblock; a registry is a list of recipes at an https address (keg selfhost registry add), and a recipe of your own is installed withkeg selfhost install -f. A recipe names images and builds nothing, mounts only volumes of its own, and reads only its own settings. Installed apps start again with the node.Scripts/selfhost-registry.pymakes a registry to publish from a folder of recipes. See docs/SELF-HOST.md.
Changed
- Keg's site is runkeg.com. The app asks
runkeg.com/appcast.xmlfor its updates from this release, and the app's messages, thekegcommand and the Homebrew cask name runkeg.com. Earlier copies keep asking keg.rahultrikha.com, which answers as before. - The version on the site and in the install steps is written by
Scripts/stamp-site.shat each release; it had said 0.15.1 through six releases.
[0.15.7] — 2026-12-01
Changed
- The Mac's VM starts in about 0.22 s (a quarter of a second in 0.15.6). A stop now closes the data disk, and a disk closed cleanly is not checked again at the next start: that check was 40 ms of every start, because a container starting as the stop was asked for kept a file open and the disk was only ever synced. After a crash, or the VM being killed, it is checked as before. The agent makes the container bridge while it clears the last run's folders, the Mac's folders are shared while the disk mounts, and the helper asks a starting VM for its first connection every 2 ms.
- The Mac's VM is smaller: its kernel 14.6 MB (15.2 in 0.15.6; the firmware's NVDIMM table, the crypto API's tests of itself at each start and FIPS mode are out of it), and Keg's own programs in it a seventh smaller (kegd 19 MB where it was 22), which is 5.5 MB of memory the VM no longer holds.
Fixed
- The console writes a size under a thousand bytes whole: a container's network rate read "70.07007007007007 bytes/s".
- A stop of the Mac's VM left the data disk's journal open when a container was starting as it was asked. Nothing was lost (the disk was synced, and the next start replayed the journal), but every start paid for it.
[0.15.6] — 2026-11-30
Fixed
- On a Mac, a command run in a container ran in the VM's own files (0.15.5 only).
keg exec,docker exec, a container's health check and a command in a machine joined the container's processes and network but stood in the Linux machine's own filesystem, with the container's under/newroot: a program only the image has was "not found", a health check that ran one failed and its container was unhealthy, and what such a command wrote went to the machine's memory, not the container. 0.15.5 stopped copying the system at each start and entered it without making it the root of the machine's mounts; it is now moved there first. Containers started withrunwere not affected. Update, then Stop Keg and Start Keg. - The Mac app's and the console's memory meter counted what the VM had handed back to macOS as in use (0.15.5 only), so an idle VM read as nearly full, in red. What the balloon holds is no longer counted.
- A container cannot open the VM's own kind of socket (AF_VSOCK), the door between Keg's VM and the Mac: one could reach what the Mac listens on for the VM, such as an SSH agent shared with
keg vm start --ssh-agent. Docker's default filter refuses it too. A privileged container, which is root on the node by design, still can.
Changed
- The Mac's VM answers in about a quarter of a second (0.3 s in 0.15.5): the kernel's waits for a grace period end at once, and kegd listens on the Mac's virtio sockets itself, where a
socatwas started for every connection (a request through to the node 0.29 ms, from 0.8). - The Mac's VM's kernel is 15.2 MB (16.4): network cards, NVDIMM, hotplug and consoles it never has are taken out.
- The balloon keeps what the VM uses and 256 MB, and the VM, saying when it is short of memory, is given a gigabyte at once.
Added
- Powered off while nothing runs (experimental,
deep-sleep): the Mac's VM is powered off after its idle minute when no container, machine or service runs at all, and holds none of the Mac's memory; the next command starts it again in about a quarter of a second. Scripts/check-mac-vm.sh, which a release now passes on a Mac first.
[0.15.5] — 2026-11-30
Changed
- Keg on a Mac is faster and lighter. Measured on one Mac, with the
dockercommand:docker run --rm alpine truetakes about 21 ms (47 before), a container's whole life through the Docker API about 4 ms (61 before), and the VM answers 0.27 s afterkeg vm start(0.6 to 0.8 s before). What changed: a start no longer waits for the network link of the container before it to be taken away;--network noneis a network of its own with only loopback, not a link on the bridge; a container is said to have ended before its files are forced to disk; the node starts without waiting for DHCP; the system is no longer copied at every start.docs/PERFORMANCE.mdhas every figure, and what was tried and not kept. - The Mac's VM runs a kernel of Keg's own. Linux 6.18.35 as kernel.org publishes it, with Kata Containers' configuration and patch, one patch of Keg's, and the hardware a Mac's VM never has taken out: 16 MB where the kernel before was 30. It is built with each release from
vm/kernel, and its source, patches and configuration are in the release's GPL source. The system image is packed with LZ4 (initramfs.cpio.lz4). - Memory the Mac's VM is not using goes back to macOS. The VM kept every page it had ever touched: after 1.5 GB had passed through its file cache it held 1.9 GB of the Mac's memory for good, and now about 0.8 GB a minute and a half later.
keg vm start --memory-return offkeeps the old way, for a node whose containers suddenly need much memory and cannot wait a second for it. - Clean Up is the first section of Storage, in the Mac app, with what goes, what it frees, and the button; it says what the node did (what was freed, or why nothing was) where it said only "Cleaned up". The Overview has Clean Up beside its disk meter, and the console's Storage page says first what a cleanup frees.
Added
- Every experimental feature at once.
keg settings experimental on all(andoff all), All Experimental Features in the Mac app's Settings, Turn all on… in the console. - Sleep while containers are quiet (experimental,
quiet-sleep): the Mac's VM sleeps after its idle minute even with containers running, when none has used the processor or the network in it; a connection to any of them wakes it in a few milliseconds.
Fixed
- Clean Up in the Mac app could do nothing. In an app that had run for a while the Clean Up… button opened nothing. It no longer opens a sheet at all.
- The Mac's VM could stay awake for minutes with nothing running: a look the VM's helper takes at the node was counted as work.
[0.15.4] — 2026-11-30
Fixed
- A Mac VM is never started while its disk is being moved.
keg vm disk --pathrefused a running VM, but akeg vm start(or the app's Start Keg) during the copy booted the VM on the old disk, and what it wrote would have been lost once the move let the old disk go. The move and a start now take the same lock: a start says it is waiting and boots on the moved disk once the move is done, and a move refuses while a start is going. - The Builds list and a build's steps count alike. The list counted the steps that add files (RUN, COPY, ADD), a build's steps every step, so one build read "4, 3 from the cache" in the list and "5 ran, 3 from the cache" beside its log. Both now say what the steps that add files came to ("1 ran, 3 from the cache"); the rest (FROM, ENV, WORKDIR, CMD and the like) are drawn and counted as settings, in the console and the Mac app.
[0.15.3] — 2026-11-30
Fixed
- The threads chart and the events strip fill their width once things are quiet. Each used to run from the oldest thread or event to now, so a burst of work a day ago was squeezed into its first bar. While a thread is still going the chart still runs to now; otherwise it, and the strip, end at the last thing that happened, and say when that was.
- A log line's time is read when its date is written with slashes, as Go's log, nginx and NATS write it (
2026/11/27 09:29:39), in the console and the Mac app; such lines used to be counted as "Earlier".
[0.15.2] — 2026-11-29
Added
- The pages show how things connect and when they happened. The console and the Mac app keep their layout; six pages are drawn anew:
- Services: beside each environment's list, a map: where each service is reached, the service with its state and release, and what it uses (its database, then sign-in, agents, mail and the rest its
uses:names). A stopped service has no address on it; a service leads to its container. - A container's output: a timeline above the lines, errors and warnings on top of each bar, following the find box and the level; a bar leads to its first line. A line's time is the one it writes (ISO 8601), else the line before it's, else when it arrived.
- Changes: where a change got to (proposed, checks, approval, deployed), and every release of that service in that environment, each leading to its change.
- Builds: a build's steps, each as wide as the time it took, coloured by what happened (ran, from the cache, failed, not reached), the longest named; a step leads to its place in the log.
- Events: how events flow: who wrote the latest, of what kinds, and which of Keg's services each is told to, with how their deliveries stand; and the latest events over time.
- An app: its service's map in each environment, and its agents' newest threads over time, each a bar from when it began to when it ended, leading to the thread.
- Services: beside each environment's list, a map: where each service is reached, the service with its state and release, and what it uses (its database, then sign-in, agents, mail and the rest its
- A build's log says how long each step took:
---> took 1.2 safter each step's output.
Fixed
- A reply's chunks are put back together as bytes, so a page or a log cut inside a character is no longer garbled.
- The Mac app's Members… button says whose members it opens.
[0.15.1] — 2026-11-28
Added
- Whether a mailed sender is genuine (experimental
mail-verdict, needsmail). Mail-in checks SPF, DKIM and DMARC as a message arrives and writes the verdict with it: each check's result and domain, andfrom_verified, true only when DMARC passes and the message names one From address.keg.mail_from_verified(event)andkeg.mail_verified_sender(event)answer an app's agent, only of mail the asker may read. Lookups are bounded (2 s each, 10 s in all, 64 a message, cached for their time, counted with mail's limits); one that runs out saystemperrorand the message is still taken. - A member may hold more than one role (experimental
member-roles). Each keeps one role as before; an administrator grants and takes more (keg.grant_role,keg.take_role); every check of a role reads the whole set: asks and their answers, approvals, organisations' tools, audiences, replays, andkeg.actor_has_role(R)for policies.keg app members, the console's Members… and the Mac app's Members sheet show them;@keg/appand the Go client grant and read them. - The console shows an app's agents' threads. An app's page (Apps → an app → an environment) has a Threads tab: each thread's agent, organisation, state, what it waits for and until when, and spend; a thread's events, labelled by who wrote each; its asks, with their arguments only as Keg writes them out; and Wake, Stop and a dry Replay where a person may.
- A node's disk sync mode is its own.
keg vm disk --sync full|fsync|none(stopped VM only);fullstays the default for every node; a lighter mode is said among the node's warnings. On a clean stop or sleep the whole disk is written to permanent storage on every mode. docker run --initandkeg run --initgive PID 1 to Keg's own small init, as Docker's does: it reaps orphans, passes signals on and ends with the command's status. It runs from a sealed copy in memory and holds nothing of the node's memory.- Webhooks on a node with no public name, such as a Mac: deliveries are taken on the node's local names port, which a Mac forwards to its own localhost, with the same checks and limits;
keg app hookssays where to point a tunnel. keg app check [NAME](experimentalapp-check) runs a project's check as a piece of work's gate does, with its own database and a fake model, on a read-only copy of the folder, outside a piece of work.- Agents:
thread.waitForandthread.listentakematch, so a thread waits for the event about its own ticket and nothing else wakes it; a thread's own tools read the event that started or woke it (keg.actor_thread_event); a thread an emitted event starts outlives the emitter, held to its lineage (one budget, at most 100 threads, stopped with its root);keg.actor_thread_agent(); a wait is written on the thread as awaitevent, and a wake says who woke it; an agent may ask no model withmax_usd 0.
Fixed
- Disks. A disk path given before a node's first start is used, never replaced by a new file on the internal disk; a start refuses a link to nothing and says why. The Mac's free space is checked (a warning under 10 GB, no start under 2 GB) and shown while the node runs. A node whose disk went read-only or failing says so first among its warnings and takes no new work, rather than answering every write with a raw I/O error.
- Security, from an outside review before release: a lineage stops whatever its root's state, and only as far as the stopper may read; a job's events count against the lineage of the thread that enqueued it; a feature turned off reaches every app database (numbered tellings, each with a time limit, retried and named to the person if one cannot be told); every invisible character is written out, one to one, and a secret cut by an ask's 200 characters is hidden; at a node with no public name, one sender or a web page cannot stop hook deliveries;
KEG_TEST_MAIL_DNSis honoured only by a build for tests;keg app checkreads only inside its project and its machines are the node's. - What an ask shows is written out one to one (a backslash too), so two different arguments are never shown alike; secrets are hidden before anything is written out;
keg app threads … --jsonescapes bidi and hidden characters. - The firewall keeper lets a node go only when its folder has been gone at three checks; a run's walls are checked before its image is fetched; mail-in reaches a Mac node from the Mac itself; every certificate the node signs carries what strict clients (Python 3.13) require; Keg services no longer offer the model gateway as a service to install, and
keg system install modelssays why;keg vmacts on the node its socket names;keg settings experimental on|off NAMEsays that feature; the SSH door's server advice is not shown on a Mac node;keg mailandkeg app hookshave help for every flag;make appmends a Swift dependency left half made.
[0.15.0] — 2026-11-27
Added
- Experimental features. What a node is still trying is off until a person turns it on:
keg settings experimentallists each,on NAMEandoff NAMEturn one on and off (a person's to do; off keeps what it made), and the console (Keg services) and the Mac app (Settings) have them too. Off means off everywhere: the node refuses its requests, the assistant and a chat app are offered none of its tools, its doors and loops stop, andkeg --help, the console and the Mac app leave out its commands and pages. Experimental in this release: workspaces and the connector door (0.14.0), previews, git in a workspace, the SSH door,keg setup server, model providers and SDK-shaped endpoints, the vault's uses by hand, mail in, webhooks and an organisation's tools. A node upgraded with workspaces or a named door keeps those on and says so. EXPERIMENTAL.md - The vault, for what you run by hand.
keg run --name N --secret NAME[,env=VAR|,file=FILE]gives a container an entry, as a file in/run/secrets(in memory, 0400, its user's, read only) or as a variable; running it is the grant of that entry to that container, kept while it is there. Inkeg compose up, a top-level secret markedexternal: truenames an entry, given as a file to the services that list it once a person grants it to the project for its folder (keg vault grant NAME --compose PROJECT [--service S]).keg login HOSTkeeps a registry's login asregistry/HOST, used for the pulls and pushes a person asks for there and for the pull of a person's release; an agent's or a work's release pulls with it only bykeg vault grant registry/HOST --registry HOST, made since it was last set, and a host's login is never sent to another.keg vault show,export(sealed under a passphrase, never the node's key) andimportare a person's alone, at a terminal on the node itself, and so is handing an entry by hand (keg build --secret,keg run --secret, a Compose project's entries): never the console's nor a request's from another machine; each entry a build is handed is written down asvault.used. A build is handed an entry at aRUN --mount=type=secretstep:keg build --secret id=ID[,entry=NAME], akeg.yaml'sbuild.secretsgranted withkeg vault grant NAME --build SERVICE(a work's build only by a grant made since the entry was last set), or a Compose service'sbuild.secrets, ordocker build --secret id=NAME,src=/dev/nullthrough Keg's Docker API for a secret the client offers empty (one offered with a value is the client's own, even where an entry has its name); never in a layer, the cache, the image's config, the build's log or its record.keg vault stalelists what holds a value from before its entry was last set,keg vault restart NAMErestarts the containers that do, and a grant a release or build waits for is a Needs-you item with the command that makes it. The Mac app has a Vault page: names, notes, when each was set, grants and what holds an old value, with Set, Grant and Restart, never a value. The assistant can read the vault's names and grants (keg.vault.list) and what holds an old value (keg.vault.stale), never a value. VAULT.md - Hooks: another service tells an app what happened, and that can start a thread of one of its agents. An app that uses agents declares a hook in a migration,
keg.hook(name, scheme, secret, agent), signed as GitHub, Stripe or Slack sign, as a plain HMAC of the body (optionally of a signed time, held near), ornone. An administrator of an organization asks for that organization's address withkeg.hook_url(name), shown once:https://<the node's public name>/.keg/hooks/<token>. The node checks the signature with the vault entry granted to the app's service under the hook's secret name, and the app's database writes a delivery once, as an eventkeg.hook.<name>of that organization marked as from outside, which starts the hook's agent. A delivery sent again is known by what its signature covers, never by a header. Every address that is no hook's is answered alike; the node knows every address and its secret in memory, so a request reads no database and no vault; what leads nowhere and what is forged each pay a budget of their own, so a flood of either takes nothing of a verified sender.keg app hooks APPlists an app's hooks and what was sent to them, and says of anonehook that anyone who knows its address can forge and replay what it takes. See the agents guide and PROTOCOL.md. - The Go client runs an app's agents.
k.Agent(name, handler)andk.Worktake each thread's wake as@keg/appdoes; a step reads its events, asks the model through the app's door with its claim, runs tools in one transaction with their result (a tool that changes things only on a person's approval of that very call), asks, waits, sleeps, starts a child and ends; a dry replay changes nothing.ModelBaseURL()is the address to give an SDK of OpenAI's or Anthropic's. - Mail in: a message to an app's address starts a thread of one of its agents. An app that uses agents declares an address in a migration,
keg.mail_address(word, agent); an administrator asks for their organization's withkeg.mail_url(word), shown once:word+<token>@<domain>. Nothing is taken until a person gives the node a domain (keg mail domain DOMAIN, whose MX is theirs to point) and turns it on (keg mail on, port 25 unless--port; in a Mac's machine only with--on-a-mac). The node then takes mail for those addresses only: it never relays, sends or bounces, and refuses what it will not take while the sender is connected, in the same words for every address that is no one's. Every input is bounded (line, commands, recipients, 10 MiB, attachments, time, conversations and messages per network, per address, per app). A message is read bymail-parser, never by MIME reading of Keg's own, and written once as an eventkeg.mail.<word>of that organization: its headers, its text and its attachments listed (the small ones kept), escaped, marked as from outside, and its senderunverified: no SPF or DKIM is checked. STARTTLS is offered with the node's certificate for the domain where it has one.keg mail showsays how it stands and what it refused;keg app mail APPlists an app's addresses and what was mailed to them. See the agents guide and PROTOCOL.md. - An organisation's own tools, run by the node in a container that reaches nothing. A signed-in member of a role the app names (
keg.org_tools_by) uploads a tool of JavaScript withkeg.org_tool_put. The tool has a name beginningorg., a sentence, a schema for its arguments and code. The app's agent calls it withthread.tool({ name: 'org.…', arguments })and no function. Keg's SQL gives the code only to a step of a thread of that organisation, with a claim signed with the node's key naming the thread, the organisation and the code's hash. The node runs only that code, for that step, in a container made for the call. The container has no network and no volume, runs as nobody, has no capabilities, and is held to the time and memory a person set withkeg app org-tools APP on --env ENV(5 s and 128 MiB a call, and 600 s a day, by default), of which one organisation may use a quarter of the day and two of the four calls at once. Its clock reads only the day, and nothing is kept between calls. Every upload, replacement and removal is an event with the code's hash, and so is every call. Capability file 023. - The Mac app has Access, Workspaces, Agents and Models pages, as the console has them. Access: the connector door (its address, Open for Ten Minutes, Shut Now), sign-ins that wait (let one in by typing the code its app shows, or turn it away), everyone let in with what each has open (rename, revoke), the SSH door (on or off, its host key, open sessions with End), adding a key, making a token by hand (shown once to copy, never kept), letting a sign-in in as someone already let in (the node says what that does, and a second press says yes), client documents on or off, and where previews go. Workspaces: each one's state, owner, folder used against its limit, project, previews (public until they expire, private again, closed), repositories (added with the host's key shown first to check), limits for one or for new ones, sharing, and the record of what it ran, never what it printed; new, start, stop and remove. Agents: an app's threads in an environment, the stranded mark and Wake, a thread's events as written (an ask's arguments in full), Stop, and a dry Replay with Compare. Models: the models offered with their prices (cached input too), each limit with its note and Let It Go On, changing a limit (for an app, each organization's too), and today's spend by spender and organization. What a stranger wrote is shown as plain text, with characters that turn or hide text written out. Their new sentences are shown in English until they are translated. Asks are shown in a thread and not answered there: they are for the app's own people.
keg setup server: from a Linux server with Keg on it to a door an app can be let in at, as a checklist. Run on the server, it prints a line for each thing the node looked at, each with a name that never changes, a state (ok,to do,cannot tell,wrong) and a sentence: the node's public name, whether its names lead here, what holds ports 443, 80 and the SSH door's, what of Keg's or a database listens on an address other machines can reach, the certificate, the doors' names, the image a workspace is made from, and the door tried from the node as an app would try it. It changes only what is Keg's own, each change shown and asked first (--yesfor all): a drop-in of Keg's own unit for the public name (--domain), the names of the connector door and of previews, the workspace image, and a user for the SSH door's helper. It never edits the server's firewall, another unit, or what holds a port.--checklooks only and ends with 1 while anything is left;--jsonis for a program. The console's Access page shows the same checklist, read only, on a server whose door has no name. WORKSPACES.md has the whole road and a table of what is open to the internet and what is not.- A workspace says how much of its folder is used, against its limit, in
keg workspace lsandshowand in the console, where the node can tell. The driver reads its own filesystem's count; nothing in the folder is opened. - The console adds a repository to a workspace and ties it to a service. For ssh nothing is added at first: the host's key is shown, and added only once you have given the key you checked. The Command page says what each organization of an app spent today where you set them a ceiling.
keg access sshsays when the door's helper has no user of its own, and how to give it one. - Keg's SSH door:
sshlands in a workspace, and nowhere else.keg access ssh onopens it on port 2222 (off until you do);keg access add-key NAME < key.pubadds a key as an identity;ssh -p 2222 WORKSPACE@your-serveris a shell in a workspace that key's identity made or was given,new@makes one, and a command,scp -O,sftpand-Lto the workspace's own ports work as they do anywhere. Only ed25519 and ecdsa keys are taken: no passwords, no certificates. Another's workspace, a name nothing has androotare refused in the words and after the wait a wrong key is. Your agent, your display, ports and sockets of the server, and forwards to anywhere but the workspace are refused. Revoking the key, stopping the workspace, taking a share back orkeg access ssh end SESSIONcloses a session at once. The protocol is spoken by a program of its own with no rights,keg-sshd, which can only ask the node: the node never reads a stranger's SSH packet.keg access sshprints the door's own key to pin. An RSA key is no longer taken byadd-key. - Git in a workspace, a repository you give it, and a release proposed from it. An agent at the connector door has
git_status,git_diff,git_log,git_commitandgit_branch; what it gives them is checked before anything runs, and nothing git could take for an option is taken.keg workspace remote NAME add origin URL --key ENTRYgives a workspace a repository elsewhere and a vault entry (a private key for ssh, a token for https) to push to it and fetch from it with:git_push,git_fetch,git_pull. For ssh the host is pinned to the key you confirmed by its fingerprint. The key is in the workspace for the one command and written down nowhere; a workspace granted a key can use it for as long as it is granted, so give it a deploy key.keg workspace project NAME SERVICEties a workspace to the one service it may release, andproposebuilds a release from its last commit as an agent's: it waits for you wherever an agent's does, is handed no secret unattended, and says in the change set which workspace, connector and commit it came from.needstells an agent what it asked for that waits.keg workspace new --from … --key …makes a workspace from a repository that is not public. - Previews: look at what a workspace serves, at a private address of its own.
keg access previews keg-previews.example.netsays once where they are answered: a domain of your own that shares no parent with the node's public name (Keg refusespv.keg.example.comorkeg-previews.example.combesidekeg.example.com, as a preview's page could otherwise set cookies for the connector door and every shared app);keg workspace preview NAME PORT(or an agent'spreview_open) gives a porthttps://<name>--<workspace>.keg-previews.example.net. Another preview's page reaches a preview only as a person following a link, and a page of another site cannot post to the connector door. It answers only a browser you let in by the six-digit code its page shows (keg access approve CODE, or the console), to that one preview; a browser that was not let in never reaches the workspace. Keg's cookies are taken out of what goes on to the workspace, and the workspace's server can set none of Keg's names and none for a wider name.keg workspace publish NAME PORT --for 2hmakes one public for a while and is yours alone; an agent can only ask. An agent reads what its server answers withpreview_fetch, which asks that port and nowhere else. The console lists a workspace's previews and the browsers let in. See WORKSPACES.md. - Keg's model gateway is part of the node. The node claims the calls it holds and reaches the provider itself, reading the key of each call's provider from the vault for that call alone; there is no
modelsservice to install, start or keep. A node that ran one stops and removes it at its first start, keeps its keys for the node, and says so once (its log, an event,keg assistant model).keg system install modelssays there is nothing to install, andkeg assistant setupinstalls the assistant alone. - A model provider of your own.
keg assistant provider add NAME --url URL --kind openai-compatible|openai|anthropic [--key-from-env-file PATH | --no-key] [--allow-private],ls,rm,testanddefault;keg assistant model add PROVIDER/MODELwith its prices or--free. OpenRouter, Azure OpenAI, a local Ollama, LM Studio or vLLM (Chat Completions), OpenAI's Responses, and Anthropic's Messages. The key is the vault'skeg/model/NAME, for the gateway alone. A local or private address only for the one address and port a person allowed; on a Linux server that may be the server's own loopback. What each provider says it read from its cache is counted at the cached price. - Standard SDKs and agent frameworks reach the model through Keg. An app's door and a work's door answer
POST /v1/chat/completions,/v1/responsesand/v1/messages, streamed or whole, andGET /v1/models, with the door's token as the SDK's key: only the base URL and key change. Each call is held, settled and limited as a call in Keg's own shape; a model not offered is refused in the SDK's own words; what Keg does not carry (images, audio, tools the provider runs) is refused plainly. - A workspace may be given the model.
keg workspace model NAME on --usd-per-day N(a person's) gives each new command in itOPENAI_BASE_URL,ANTHROPIC_BASE_URLand a token of its own as the SDKs' key, so an agent framework in a workspace asks the model with nothing set by hand. Its wall allows the node's door at one address and port and nothing else of the node's; it spends asworkspace:NAME, held to its own ceiling.off, a stop, and its owner revoked each end it. - An agent's step through an SDK is counted for its organization. The compatible endpoints take
Keg-Claimas the native path does, sent as one of the SDK's default headers, so per-organization ceilings hold for it too.
Fixed
- Security:
keg sandboxis walled to the internet. It ran on the node's own network, where it reached whatever the node listens on at its loopback (its API, the model's door, a database). An agent's sandbox, and a person's by default, now reach the internet alone; a person who wants the node's network sayskeg sandbox --host-network. - Security: a container's wall is never opened to a loopback or link-local address.
egress_allowrefuses127.0.0.0/8,169.254.0.0/16(where a cloud server's metadata gives out its credentials),::1andfe80::/10, in a sentence that says why. - Security: a message is a repeat only by its own bytes, for the address it came to. It was named by its Message-ID and the sender's claimed domain, neither of them verified, so whoever sent first with a real message's id had that message dropped as a repeat.
- A hook's body and a message's attachments reach the app whole. They were handed to the database as an option of psql's, which Linux holds to 128 KiB; they now go on psql's input, as hex written once as it is sent. A hook takes 4 MiB; a message keeps an attachment of 4 MiB (8 MiB of one message's).
- Mail and hooks hold what arrives apart, and only so much at once. Each has a pool of its own (mail 128 MiB, hooks 64 MiB), held only once a request has passed the cheap checks, as its bytes arrive (never from a length promised), and to a share for each network and address; past that, a mail server is told
451and a hook's sender503, both to send again later. - Security: what arrives from outside cannot fill the disk or spend an organization's money. Each hook's or mail address, and each app in all, take so many bytes a day (64 MiB and 256 MiB unless the app says otherwise); past that, a hook's sender is told
503and a mail server452, and nothing is written. What was received is kept 30 days unless the app says otherwise, then goes with its event and its attachments. An organization's deliveries and messages start at most 200 threads a day; past that, each is written and starts none. An app says these withkeg.inbound_limitsin a migration. A verified hook delivery no longer pays its sender's network's count, so GitHub's bursts are not refused; a mail conversation has 15 seconds and 20 commands to name an address, and with every place held a newcomer takes the oldest idle one's (or is told421), so idle conversations cannot keep mail out. When an app's addresses cannot be read, a sender is told to try again (451,503), never that the address is no one's; the node reads them one request at a time. An attachment's long name, a body Postgres's JSON refuses, and a long Stripe id no longer make a delivery fail for good. - Turning an organisation's tools on fetches their image then, and says so when it cannot be fetched, rather than at a tool's first call.
- The Mac app's Models page has the providers: listed, added with a key read from a file you choose (sent once to the vault, kept nowhere by the app), made the default, and removed.
- Security: a command an identity left running in a workspace is stopped when it loses that workspace. Un-sharing a workspace, revoking an identity or removing its key ended its sessions and the calls it was waiting on, but a command left running by the connector door's
run_startran on. Who started each run is now written down before it starts, where it outlasts the node, and losing the workspace ends every run that identity started there; the node looks again each minute and after it starts. - A call whose caller went away stops. A call whose answer was not taken to its end (the caller closed its connection, or stopped reading) is ended at the provider, settled at what it used, and gives back its place at once, in every shape; a caller gone while it waits for a whole answer is noticed too.
- One set of bounds for every call at every door. What the tools' schemas describe is checked in the one check every call passes, and every request body is looked at as bytes for how deep it nests and how many values it holds before any of it is built.
[0.14.0] — 2026-11-26
Added
- An agent in an app asks the app's own people.
thread.askin three kinds: approve one exact call of a tool, choose one of a few, or answer in words; addressed to roles or users of the thread's organization, waiting up to 30 days, answered once. The app's pages readdb.asks()and answer withdb.answer(); only a person who signed in answers (never a job, a tool or a worker). Keg tells those asked withkeg.ask.asked,keg.ask.answeredandkeg.ask.expired. - A tool declared
changes => truenow runs, on a person's approval of that very call, once, as that person. The person is shown the tool's own words filled from the call, never the model's; other arguments, a second run, an expired approval or an approver who lost the role are refused. - A thread waits.
thread.sleepUntil(time),thread.waitFor({ until, event, about, message })andthread.listen: woken once by whichever comes first, across restarts of the app and the node. An event wakes a thread only if everyone who may read the thread may read the event.keg.thread_messagesends a thread a message. - A thread starts a child agent:
thread.spawn(agent, input, { budget }), its budget carved from the parent's, the parent woken with its result. A thread that started several is told of each once, as each ends and in any order. - What wakes a thread has room of its own. A thread keeps 50 messages unread and takes 20 within a minute from one sender, and messages never keep out an answer, an event, a child's end or a person's wake. A thread that more events came for than it keeps unread reads
wake {why: 'missed'}at its next step.keg app threads wakesays when it did not wake a thread (no worker of the app has taken the wakes it was given), and writes nothing then. - What a person approves hides nothing. The tool's sentence ends an argument it cut with
…and writes out characters that turn or hide text (\u{202E}); an approval is asked only of arguments the tool's schema names, with those it requires; the ask carries every argument, for the app's page to show in full beside the sentence.askandapproved_byon atool.callare Keg's alone. An ask expires no later than its thread's own time runs out, so an agent that waits days for a person needsmax_minutesto match; a wait for an ask that is no longer open ends at once; and an answer to a thread that ended meanwhile is told the ask was withdrawn. keg app threads wake APP IDwakes a thread;keg app threadsmarks asstrandedone that is ready with nothing to wake it;keg app threads APP IDshows a thread.keg work approve N,keg work reject Nanswer a piece of work by its own number, andkeg needsandkeg work showname them.keg work evidence N [CHECK]prints what a work's checks printed.- A piece of work is handed the Keg skill under
/keg/skill, the guide to an agent in an app among it. - A thread is replayed, dry.
db.fork(thread, at, { vary, budget })makes a new thread with the same record up to an event, which goes on by itself with other instructions or another model;db.compare(fork)says then and now;db.evaluateforks up to twenty at once. Keg holds a replay dry as far as it reaches: its tools' transactions are read only, a tool that changes things is recorded as what it would have done, it asks no person and starts no child, nokeg.thread.*event is written for it, andkeg.txin its handler is read only. Anything else a handler does (a mail, a request to another service) is the handler's to hold: make it inthread.tool, or checkthread.dry. Replaying is for the roles a migration names withkeg.agent_replay(administrators by default) and the node's person (keg app threads replay,keg app threads compare); a replay is read only by one of them who may also read the original. A fork spends from a budget of its own, five cents unless more is asked. - Each organization of an app is counted, and held to a ceiling of its own when you set one.
keg assistant limits app:APP/ENV --per-organization-usd-per-day N. The app's door checks a claim Keg's SQL signs for each step of a thread, so an app cannot count one organization's spend under another;keg assistant usagelists organizations under their app, and what dry replays spent as evaluations. - Input a provider read from its cache is counted at the model's cached price:
keg assistant model NAME --cached-input-usd-per-mtok N, and the four OpenAI models Keg ships with have their published cached prices. What is held before a call is still at the full input price. - A tool takes lists and objects.
keg.toolrefuses, when it is declared, a schema with an argument no call could carry; in the sentence a person approves, a list reads "3 items". keg work attach N PATH --replaceputs a file in the place of one handed before;keg work send-back N --note-file FILE; a failed check that ran against a database says the threads it left and their last events;keg vm statusandkeg system lssay the node's build beside its version, and when thiskegis another build.- A policy can ask what the acting thread is about.
keg.actor_thread_input()andkeg.actor_thread_about()give the input, and itsabout, of the thread a tool's transaction acts for, and null to everyone else, so a table can be read by a thread only for the thing that thread is about. A policy that readkeg.my_threadsfor this failedkeg.tenant_tableandkeg.tenant_refwith "permission denied for view my_threads"; the guide says not to. - Workspaces: a lasting, walled machine to build in.
keg workspace new [NAME] [--from https://…]makes one and starts it: a machine that reaches the public internet and nothing of the node, its containers or any private network, run as a user that is not root with no capability, with a folder of a fixed size at/workthat is kept when it stops.keg workspace ls,show,start,stop,rm, andrun NAME -- <command>. A workspace is stopped when nothing has called it for its idle time (30 minutes) and starts again on the next call; one stopped for 30 days is listed bykeg cleanupand never removed by it. Each has limits the node holds it to (its folder's size, memory, processes, idle time, a command's time), which a person changes withkeg workspace limits. It is made from the image a piece of work's machine uses; an image of Keg's own for workspaces, with more toolchains in it, comes later, and a person can name another by its contents with--image NAME@sha256:…. What a command prints is given back up to 64 KiB and the rest is read by the run's name. Each command is recorded with who ran it, where, its program, how many arguments it had, how it ended, and its first 200 characters with what may be a secret hidden (the name and password in an address, what followsAuthorization:,--passwordand the like, the value of a name such asAPI_KEY=, and anything long that looks made by chance); never what it printed or read, and of its environment only the names. The hiding is best effort: the record says who ran what kind of thing, and is no transcript. keg access: who is let in at Keg's doors. An identity is a connector or a key, named by you, an agent in what it may do and held further to its own workspaces: it never approves, confirms, reads the vault, installs, changes limits or lets another in. A connector that asks is shown a short code and waits inkeg needs, where what it says of itself is said as what it says;keg access approve CODE [--name NAME]lets it in. A code is good once, for ten minutes, and five wrong answers end those that wait.keg access ls,rename, andrevoke, which ends an identity's tokens at once and stops what it has running.keg access add-key NAME < key.pubadds an SSH public key (ed25519, ecdsa, or RSA of 3072 bits or more) for the SSH door, and refuses a private key. Tokens are kept as hashes only. The doors themselves, the connector endpoint and SSH, are not in this release.keg workspace share NAME --with IDENTITYgives an identity the use of a workspace that is not its own.- The connector door: add your node to the Claude and ChatGPT apps, Grok and Claude Code, and an agent in a chat gets a workspace on your server.
keg access name HOSTnames the door (the node's public name or a name under it; it is served by the node's public front door, on port 443, with its certificate), andhttps://HOST/mcpis what is typed into an app. The door is MCP over streamable HTTP, in the form with a handshake and in the 2026-07-28 form without one, with OAuth sign-in: the documents an app reads, a client named by its document (fetched only fromclaude.aiandchatgpt.com) or registered by itself, PKCE, and tokens good at this door's own address alone, renewed in rotation, where one shown twice ends the whole sign-in. The door is shut to new sign-ins until you open it (keg access open, ten minutes;keg access close); those already let in go on working. An app sends your browser to a page that shows a code and waits: nothing is typed there, and you let the code in from a place you trust (keg access approve CODE). The approval names the host the app asks to be sent back to before what the app says it is, and a host Keg does not know needs a second yes (--unknown-redirect).keg access token NAME [--days N]makes a token by hand for a client that cannot sign in. Fifteen tools:workspace_new|list|show|stop|remove,files_write|read|list|search|patch,run,run_output,run_start|status|stop; a reply is at most 30,000 characters and says how to read the rest;runwaits 30 seconds (120 at most) and then hands back the run's name instead of failing. Files are read and written by a script run inside the workspace as its user: the node never opens a workspace's file. A command left running keeps its workspace from being stopped for being idle (keg access keep MINUTES, two hours unless said). Everything else at the door's name is 404, and nothing of the node's own API is reachable from it. See WORKSPACES.md. Previews, git andproposeand the SSH door are not built yet. - Letting an app in, when more than one asks or the same one asks again.
keg access ls --waitinglists each connector that waits with its code, how long ago it asked, the address it asked from, where it asks to be sent back to and what it says it is;keg access approveprints which one it let in;keg access dismiss CODEturns one away. A wrong code is told how many wait and never which codes they wait with.keg access approve CODE --as IDENTITYlets a connector in as an identity there already is, which keeps its workspaces while every sign-in it had ends: Keg says what that does first, and does it on--yes. A host Keg does not know that you said yes to is kept for that identity and that client alone (keg access show NAME,keg access forget-redirect NAME HOST). A client that registered itself is forgotten when the last identity it let in is revoked, and those that let no one in go when the door closes, with the codes that waited. - The console has Access and Workspaces pages. Access: the door (its address, Open for ten minutes, Shut now), those that wait, and everyone let in with what each has; rename, revoke, a token by hand shown once. A waiting connector is let in by typing the code its own page shows: the console never shows a code or fills one in. Workspaces: each with its owner, state, limits and what was lately run in it (the program, its words with what may be a secret hidden, who, and how it ended; never what it printed); stop, start, remove, and limits.
keg workspace showprints the same record. - A piece of work's agent runs its project's checks itself, before the gate does. In its round,
sh /keg/bin/keg-check NAMEin the work's machine runs one of the checkskeg.yamllists as the gate will run it: on the tree as it is now, what is not committed among it; against a new database made from the work's migrations for a check withdb: true, with its services and its scripted model; in the same walls, with no credential to anything real. It prints the end of what the check printed, with the threads a failed check left, and exits as the check ended; with no name it lists the checks. A slip one run of the tests shows no longer costs a round at the gate. It judges nothing: the gate runs every check again on what was taken in, and what the agent ran is written in the round's record (keg work show) and is no check's result. The agent names a check and nothing else: the node takes its own snapshot of the tree (as it takes every commit of a work in, into a store of its own that is removed when the run ends: no branch is moved and nothing is added to your repository), and reads the check from that snapshot. A check the work changed is run as the work has it and the agent is told the gate's rule for it; one that asks formodel: realis the gate's alone. A round runs 20 of them, one at a time, for 30 minutes in all, and is told 1 MiB back, its snapshots 1024 MiB in all, unless a person says otherwise (keg work self-checks [--runs N] [--seconds N] [--output-kb N] [--snapshot-mb N];--runs 0turns it off). A run waits 30 seconds for a database, gives way to every check of the gate's, and is never given the node's last one; a run still under way when its round ends is ended with it. docker load,docker saveanddocker importwork oncedockertalks to Keg. They were answered "Keg does not do saving and loading images". An archive is read and written by the same code askeg loadandkeg save(an OCI layout in a tar, which Docker 25 and later writes; gzipped or not), each layer checked against its digest as it is stored.docker import - NAME < files.tarmakes an image of one layer from a tar's files; from an address is not done. One image is saved at a time. An archive or an import is at most 32 GiB.keg versionsays this program's version and build, the node's, and whether the two were built from the same sources.keg --versionsays only this program's.
Changed
- A work's round that ran out of its model allowance part way ends with a commit marked PARTIAL at the tip of its branch, and says the command that raises the limit and
keg work retry N. - An app's database keeps the hash of each capability file applied to it. A file that changed since (possible only between builds, before a release) is refused at the next deploy in a sentence that says what to do, never skipped.
Keg-Organizationon a call at the app's door is no longer counted by itself: an organization is counted on a claim alone.- A check the work only gave more to (a model, a database, a service, more time), its command unchanged, is judged as the work has it; as the project had it, it is run beside and reported. What a work changes of its checks is named, check by check.
keg work updatealso brings up to date a work that failed its checks.- A step that threw because the day's model allowance is spent sleeps until it resets, rather than being left ready for ever.
- A
changestool no one approved writes nothing on the thread (it wrote atool.calland atool.error).
Fixed
- Security: the connector door, before it is opened to the internet. From an independent review. A page another site sends your browser to can no longer swap the sign-in you are watching: each sign-in has a waiting page of its own, the browser's cookie is never replaced while it holds one, and a page shows only its own code. Strangers can no longer take every place a sign-in or a registration waits in: they are counted by network (an IPv4 /24, an IPv6 /48; an IPv4 caller seen as an IPv6 address is counted as the IPv4 address it is), sixty sign-ins may wait, each network holds at most three of them, and the last places are kept for networks that hold none. Short of a sign-in that would wait for you, a stranger is answered alike whether the door is open or shut: an app may register either way, which lets nobody in, and a sign-in begins only while it is open. And an app already let in renews its token however many strangers hold the door's connections. Apps sign in by registering: the door no longer offers client documents (an app naming itself by a document's address on claude.ai or chatgpt.com, which the node would fetch) unless you turn them on with
keg access door --client-documents on, so by default the node fetches no address a stranger chose. Claude, ChatGPT, Claude Code and Grok all register when documents are not offered. - A tar made on a Mac is imported, loaded and pulled.
docker import,docker load,keg loadand every other way an image's layer is unpacked failed on a tar the Mac's owntarwrote ("failed to unpack"), because such a tar names an attribute on every file (com.apple.provenance) that Linux has no place for, and one attribute that could not be written failed the file. Of the attributes a layer names, Keg now writes a file's capabilities (security.capability) and passes over the rest. Security: a layer could also nametrusted.overlay.*on a file, which is Keg's own to write; it is no longer taken from a layer. - Two sums in one sentence are never said alike when they differ. A ceiling for each organization refused as too small said "A ceiling of $0.0001 … The least that lets a call through is $0.0001" for a ceiling of a millionth of a dollar: both are now said to the millionth where rounding would make them the same.
- What a connector says it is cannot close Keg's quotation, wherever it is said:
keg access approve,ls,show,dismiss,keg needsand the console all write it through one function, on one line, with its own quotation marks replaced. - A connector that is let in and has no sign-in left is said so (
let in, signed outinkeg access ls; "Let in, signed out" in the console), where it was listed as active with nothing to tell it from one at work. keg assistant usagesays what an app spent for no organization under that app, where it came after the next spender's line.- A work whose check ran as many tests as its base is said to have "the same number as on main", where it said "no new tests": a test may have been changed, and Keg counts tests, not what is in them.
- The console brings what a dialog refuses into view.
docker rm -fof a container that keeps being started again is no longer refused now and then. A removal that looked while the container was between two runs, and waited its turn behind the start, found it running and said "is running; stop it first". It is now stopped and removed in the same turn.- A node that ended in the middle of a deploy no longer leaves an app's agents refused at the model's door until the next deploy. The key an app's database signs its claims with is changed at each deploy, kept by the node and then put in the database; a node that ended between the two kept a key the database never had, and refused every claim once the key before was six minutes old. Until a deploy's key is seen to reach the database, the door goes on taking the one before.
keg system lsand the gateway say an unset model key is set withkeg vault set keg/model/PROVIDER;keg vault lssays an installed service reads its entry, not that it was "not started with it yet".keg app threadsprints one line a thread, and "1 step".- A replay evaluates again. What a tool that only reads gave back in a dry run was recorded without the tool's name and the call's id, so a handler that finds a tool's result by its name (as the guide's examples do) took every read for one that never came, and a replay ended before it asked its model anything. A dry
tool.resultnow holds what a real one holds, anddry: true. - What a child thread came to reaches its parent as the child wrote it. A result such as
{"finding": null}came to the parent'swakeas{}: every null in it, however deep, was taken out.db.compare()showed arguments and results the same way, and no longer does. - A node upgraded from 0.13.0 is charged the cached price too. A node that had kept its own table of models got none of the shipped cached prices, and went on paying the full input price for input its provider read from its cache. Each kept model whose prices are still the shipped ones now has the shipped cached price; one a person priced otherwise is left alone, and
keg assistant modelsays so with the command that sets it. A cached price a person set is never replaced. - A ceiling for each organization that no call fits under is refused when it is set. A call is held for the most it may cost before it is sent, so a ceiling below that refused every organization, each told its allowance "is used" with nothing spent.
keg assistant limits KEY --per-organization-usd-per-day Nnow refuses such a ceiling and says the least that lets a call through;keg assistant limitslists each organization's ceiling and says when calls that do not say how much they may answer do not fit under it;keg assistant usageshows an organization's spend against its own ceiling, not the app's. The words an app shows its organization's administrator no longer end with a command of the node's. - The guides give every column of everything of Keg's an app reads.
keg.me,keg.members,keg.my_eventsandkeg.my_jobsin the apps guide, andkeg.agents,keg.toolsandkeg.my_asksbeside the thread views in the agents guide: a coding agent that had to guess joinedkeg.memberson anorganization_idit does not have. keg.tenant_refsays why it refuses a policy that reads a view of Keg's. It said only "permission denied for view my_threads"; it now names the policy and the view, and the functions a policy asks in their place. (In an app that uses agents.)- A piece of work that is sent back is told its migrations have already run. Keg tries a work by deploying it, which runs the migrations it added; a work then told to change one edited the file, and its next deploy was refused as "changed after it was applied". The note it is sent back with now ends by saying so and to add a new migration, and the apps guide says it.
[0.13.0] — 2026-11-25
Added
- A person chooses which model provider Keg uses: a URL and a key of their own.
keg assistant provider add NAME --url URL [--kind openai-chat|openai-responses] [--key-from-env VAR | --env-file PATH | the key typed unseen] [--no-key] [--key-header NAME] [--header NAME[=VALUE]],provider ls,provider rmandprovider test(one small call, said plainly). The gateway now speaks the Chat Completions shape too, streamed with tool calls, which OpenRouter, Azure OpenAI, Together, Groq, vLLM, LM Studio and Ollama speak, and Anthropic's Messages API (--kind anthropic); OpenAI stays built in as it was. A provider's key is the vault'skeg/model/<name>(its headers' valueskeg/model-headers/<name>), given to Keg's gateway alone, which asks the node for it for each call it claimed; a key is never an argument, a log line, an event, an error or anything the console or the assistant is given. Models of it are offered withkeg assistant model add PROVIDER/MODEL --input-usd-per-mtok N --output-usd-per-mtok N [--context N] [--max-output N],model lsandmodel rm; a model with no price is refused unless it is said--free(a model of one's own), because what a call may cost is held before it is sent, as an upper bound. A free model's calls hold and spend nothing and are still counted and held to calls a minute.keg assistant usagesays what each model cost. Each of these is a person's alone; none is a tool of the assistant. - Where the gateway may reach is checked when a provider is added and again at each call.
httpsto a public address;httponly with--allow-plain-http, which says what would travel unprotected; a local or private address (localhost, a LAN address, the Mac from Keg's VM asmac.keg.internal) only with--allow-private, which opens the gateway's wall to that one address and port for that provider and nothing else, shown inprovider lsand the console and taken away with the provider. A name is looked up once at each call and connected to only at a public address it gave, so one that turns into a private address is refused; no redirect is followed. Answers stay bounded in size and time as before. keg assistant setupwith no arguments walks a person through it: OpenAI, or another provider's name, address, kind, key (unseen), a model and its price, or free, then a test.--env-filestill reads OpenAI's keys, and reads another provider'sKEG_MODEL_URL,KEG_MODEL_KEY,KEG_MODEL_NAME,KEG_MODEL_KIND,KEG_MODEL_PROVIDER,KEG_MODEL_INPUT_USD_PER_MTOK,KEG_MODEL_OUTPUT_USD_PER_MTOKandKEG_MODEL_FREEonce (--allow-privateand--allow-plain-httpwith it). The console's Vault page lists the providers and adds, changes, tests and removes one in a form; the first-run guide's model key step offers Another provider…. The Mac app has no assistant settings of its own yet and is unchanged.- The vault: one entry for each password or key, given only where you grant it.
keg vault set NAME(the value from the terminal, unseen, or standard input; never an argument),keg vault ls,keg vault grant NAME --service S --env E [--as VAR],keg vault revokeandkeg vault rm. A release'sneeds.secretsis met by a grant to its service and environment giving that name, whatever the entry is called; a file never grants. Each value is sealed with the node's key with its name bound in, and hidden from what tools give back by its marks, without being unsealed. Setting, granting, revoking, removing and listing are a person's alone. Eventsvault.set,vault.granted,vault.revoked,vault.removedandvault.usedsay names, never a value. Seedocs/VAULT.md. - A grant of the vault to an app's service names its one environment, and an agent's code is handed an entry only where a person granted it since it was set.
keg vault grant NAME --service Swithout--envis refused, saying to name one and to grant it once for each environment; the console's Grant dialog has no "Every environment" and chooses none for you. A grant to every environment would have reachedlocal, where a piece of work's build is deployed, and every environment made later. A release an agent proposed or a piece of work built, applied with no person's approval, is handed an entry only by a person's grant to exactly that service and environment made after the entry was last set; otherwise it waits for a person, and is refused the entry if it is started all the same. A grant to every environment made on a node running the vault's first build is replaced at start by one for each environment the service is deployed in where a person approves what is deployed (neverlocalor anautoenvironment), said in avault.revokedevent and the node's log. keg secret rm NAME --service S --env Etakes a secret away.- Kubernetes says how to use it once it is set up.
keg k8s startends with what to do next, one line each: connect, run something, reach it, bring your own image in, stop;keg k8s statusends with the connect line and how to reach a Service.keg k8s info(and--json) prints the API's address as this computer reaches it, the kubeconfig, the context, the lines to use it alone and beside other clusters, whether kubectl is here, and the Kubernetes version. The console's and the Mac app's Kubernetes pages have a Connect box with the line to copy, the context, the address, and how to reach a Service and bring an image in. The guide isdocs/KUBERNETES.md. keg k8s load IMAGE…puts images Keg has (built, pulled or loaded) into the cluster's own store, saying each one's size; a person's command.keg k8s start --publish PORTpublishes a port of the cluster's node on its loopback, so a LoadBalancer Service (or a NodePort) on it answers atlocalhost:PORT. Ports are set when the cluster is started from stopped.- The console has a Vault page, in Containers and in Builder: each entry with its note, what it is given to and when it was set; Set an entry, Replace, Grant, Revoke and Remove. A value is typed into a password field, sent to the node once and emptied; the page is never sent one. The first-run guide's agent step says whether the model key is set and offers Set the model key…: choose a
.env(onlyOPENAI_API_KEYandANTHROPIC_API_KEYare read from it, in the page, once) or paste the key. - One flow gives any node its model key, and it lives in the vault.
keg assistant setup --env-file <path to a .env>(or, with no file, typed unseen at the terminal) readsOPENAI_API_KEYandANTHROPIC_API_KEYfrom the file once, puts each in the vault askeg/model/openaiorkeg/model/anthropic, given to Keg's model gateway alone, and checks it with one small call; the file is never read again and may be deleted.keg assistant keysis a view of those entries, with the provider each serves and when the gateway last used it. Nothing but Keg's own gateway may be given an entry underkeg/. A node's existing keys move into the vault at its first start. - An app can call a model, with no key in the app:
uses: [model]. Its containers are givenKEG_DOOR_URLandKEG_DOOR_TOKEN, a handle for the app in that environment (never the provider's key, which only Keg's gateway holds), made new at each deploy and gone when the app, its service or its environment is removed, or the service is deployed as no app's; a handle whose service no longer runs is refused.POST /v1/model/callsthere takes Keg's own request (instructions,input,tools,max_output_tokens) and answers each frame as a line of JSON as it comes, the lastdonewith what the call was counted at. What the app sends reaches the provider as it is, with nothing added; each call is held at its worst against the app environment's daily ceiling (app:<app>/<env>, $2 by default) and the node's before it is sent.Keg-ThreadandKeg-Organizationname the thread and organization a call is for, counted in the ledger and never sent. A request from a page (withOrigin) is refused, and so is one holding a value the node keeps sealed (secret_in_prompt).keg assistant model --apps <a,b>sets the models apps may ask; with none set, the default alone. - A model call can ask for an answer that fits a JSON schema, and say which tool to call.
output_schemais carried to the provider as its strict JSON-schema format, and an answer that is not JSON ends inoutput_invalid(counted, as it reached the provider);tool_choiceisauto,required,noneor one tool's name. A work's agent may now ask Chat Completions fortool_choice: "required"too. - Threads for agents, in the app's own database:
uses: [agents](withjobsandmodel). A migration declares an agent and its bounds (keg.agent('triage', max_steps => 12, max_usd => 0.10)) and what starts it (keg.start_on('ticket.created', 'triage'), one thread per event, made in the event's transaction);keg.thread_start(agent, input, to, budget)starts one as the actor. A thread is a list of typed events inkeg.thread_events, read throughkeg.my_threadsandkeg.my_thread_eventsby its organization's members in its audience (its administrators by default), and written only by Keg's functions. Its wake is a job,keg.agent.<agent>; a worker takes the thread in that job's transaction (keg.thread_take), gets a lease and the last event's number, and writes each event in a short transaction of its own (keg.thread_append), refused if its lease ran out or the thread moved on, so a step is written once; a worker that dies is followed by a wake when its lease ends.keg.thread_actmakes a tool's transaction the organization's system actor withkeg.actor_thread()set. Past its agent's steps, tool calls, minutes or budget, or 1,000 events, a thread is failed in the node's words; past its errors in a row its next model call is refused.keg.thread.startedandkeg.thread.finishedtell its audience by id only. @keg/appruns an agent's steps:keg.agent(name, handler),keg.model,keg.tools,db.startThread.keg.work()takes each wake, lends the thread to the handler and ends the step as it says (thread.next(),done(),fail()); one that returns without, or throws, leaves the thread ready and nothing woken, with a note of what was thrown.thread.model(request)writesmodel.callwith the request kept by its digest, makes the call with no transaction open and the lease extended, and writesmodel.outputwith its tokens and spend.thread.tool(call, fn)holds the arguments to the tool's schema inkeg.tools(declared withkeg.toolin a migration), commitstool.call, then runsfnand writestool.resultin one transaction as the organization's system actor withkeg.actor_thread()set; iffnthrows nothing of it is kept andtool.errorhas its words. Atool.callfound with no result on a later wake is closed asbegun_unknownand never run again;thread.key(call)is its idempotency key.keg.modelsends Keg's request as it is throughKEG_DOOR_URLand gives back text, tool calls and a parsedoutput; it retries nothing unless asked, and then onlyrate_limitedandlost(KegModelErrorwithretryAfterorresetsAt). Types inagent.d.ts.- A check can be given a model:
model: fakeormodel: real. Withfakeits command is givenKEG_DOOR_URLandKEG_DOOR_TOKENto a door of its own that answers from the scriptKEG_MODEL_SCRIPTnames (defaulttest/model-script.json, read from the commit checked), spends nothing, and keeps what it was sent for the test to read atGET /v1/model/sent; withrealit spends as the piece of work, under its ceiling, and is not run on a node with no model key. The handle is the check's alone and is let in no more once it ends. What it keeps of what it was sent is bounded: 500 requests, 4 MiB in all, 256 KiB of any one (a longer one is kept cut, withcutand its size); past the bound it saystruncated, and all of it is let go as the check ends. - The Keg skill has
references/agents.md: an agent in an app, fromkeg.yamlto the worker, as the client and the SQL have it; a test holds every call it shows to them. keg app threads: an app's agents' threads, for the node's person.keg app threads <app> [--env E] [--failed | --waiting] [--agent A]lists them newest first, with steps, tool calls and spend;keg app threads show <app> <id>shows a thread's events, who wrote each, and its model calls' requests (--jsonwhole);keg app threads stop <app> <id>stops one and its children;keg app threads start <app> <agent> --org <id> --input '{…}'starts one as yourself. Read on a transaction that only reads, with every secret the node holds hidden; every text of a thread is printed escaped (a control, escape, bidi or unseen character written out, each line bounded, a text shown line by line), as work evidence is; agents and services are refused (GET|POST /v1/apps/<app>/threads,GET /v1/apps/<app>/threads/<id>?after=&wait=,POST …/<id>/stop).Scripts/agents-checklist.sh: the twelve-factor checklist of agents on Keg, each row with the end-to-end tests that prove it (--listshows them, and which are not built yet).
Changed
- Every secret already set is in the vault after the upgrade, with nothing typed again. On its first start a node takes an environment's secrets in as
<service>/<env>/<NAME>, an installed service's asservice/<service>/<NAME>, each with the one grant it had, in one transaction, each read back before the old row is let go.keg secret set|ls|rmandkeg system secretgo on working and say on standard error the vault commands they stand for.keg secret setandkeg system secretread the value askeg vault setdoes, from the terminal unseen or from standard input; a value given as an argument, which other programs can see in the list of processes and which stays in the shell's history, is still taken, with a line on standard error saying so and how to pipe it in instead, never the value. Going back to 0.12 is not supported once the vault has been written to. - An app can no longer write an event of Keg's:
keg.emitrefuses a type that beginskeg.(capability file015_keg_types.sql, for every app that uses events or jobs). Keg writeskeg.thread.startedandkeg.thread.finisheditself, and realtime, bound services and the console take them as Keg's word; an app could forge them with any payload and audience. Upgrading: no client of Keg's and no documented pattern emits akeg.type; an app that did is refused at its next emit of one after the deploy that applies the file, and renames it. - Every secret already set is in the vault after the upgrade, with nothing typed again. On its first start a node takes an environment's secrets in as
<service>/<env>/<NAME>, an installed service's asservice/<service>/<NAME>, each with the one grant it had, in one transaction, each read back before the old row is let go.keg secret set|ls|rmandkeg system secretgo on working and say on standard error the vault commands they stand for. Going back to 0.12 is not supported once the vault has been written to.
Removed
- A piece of work no longer reads its project's
.env. On a node with no model key, a work's agent was given the provider's key from the project's.env; now the round is refused before anything runs, sayingkeg assistant setup --env-file <path to a .env>. No part of Keg reads a project's.envby itself: the assistant, a work's agent and an app'smodelbinding reach models only through the gateway. The recipe'skeyline is no longer read.
Fixed
- A model call that fails is on its thread at what it cost, and counts toward the agent's bounds. The app's door puts
spend_microon anerrorline (the settled spend, or what was held), as ondone;keg.modeladds up every attempt a retry made and keeps it on every failure,output_invalidamong them;thread.modelwrites it onmodel.output; and amodel.outputwith an error counts as an error in a row. An agent whose model kept answering what was not asked was recorded at $0 and looped until the app's daily ceiling; it now stops at itsmax_usdormax_errors_in_a_row. - One service can no longer take or shut another's door to the model. "An app is one service" now holds whatever the app uses,
modelamong them, and is checked before any handle is made or forgotten: a service B that names appdesk, made of service A, is refused, and A's token goes on working. A deploy of B withuses: [model]had replaced A's handle (B then spent as the app), and one without it had deleted A's handle even when the deploy was refused after. - A tool's transaction ends at its lease.
keg.thread_actsets the transaction'sstatement_timeoutandidle_in_transaction_session_timeoutto the lease's time left (and returns it), the client gives each of the tool's statements what is left and runs none past it, and atool.resultis refused in a transaction that raised either. A tool that hung on a slow call inside its transaction had held its xid, and so every organization's events behind it, for as long as it hung. - The agents' client tests the e2e suite runs are really run. Each group passes
KEG_TEST_KEG_URLandKEG_TEST_OWNER_URL(logins made for the test as members of Keg's and the owner's roles) into the app's container, its pattern is quoted for the shell (a name with'broke two groups), and a test it matches that is reported skipped fails the run. Every test ofagent.test.jsandagents-sql.test.jsis in some group's pattern, whichcargo test -p keg --test client_harnesschecks on any system. - A tool stops only its own thread, or a thread its thread started.
keg.thread_stoplet any tool's system actor stop any thread of its organization, one only administrators may read among them. - A thread
keg.start_onstarts keeps its event's audience and never breaks the event. It is read by the event's audience narrowed by the agent's rule,keg.start_on(type, agent, "to" => '{"roles": [...]}')(by default its administrators;{"organization": true}keeps the event's audience as it is), so a payload sent to one user or one role is no longer shown to every administrator. A payload too large for a thread's input starts the thread with a reference to the event ({event, type, about, payload_bytes}), where it failed the app'skeg.emit: a 70 KiB ticket could not be created. - A thread started from inside a thread is its child, and bounded by it. Whether a tool called
thread_startor emitted an event thatkeg.start_ontakes, the new thread records itsparent, is given at most what the parent has left (carved from it, the unspent part given back when it ends), and a tree is at most five threads deep. A thread outlives none of its own: however it ends, every thread below it is stopped in that transaction, and it gives back to its parent only what neither it nor they spent, so a tree never spends more than its root's budget. A tool that emitted the event that started its own agent grew a tree without bound, held only by the app's daily ceiling. - The app's door says plainly that
Keg-ThreadandKeg-Organizationare as the app says them. They are held to a uuid's shape, recorded in the ledger'srunandorganization, and never enforced; a ceiling per organization will be built on a claim Keg's SQL signs and the door verifies, not on them. - A check with
model: realasks the model set for pieces of work, as its work does (keg assistant model --works), and is refused any other; it was offered the models offered to apps. - A tool's change and its record commit together, or neither does. A tool's
dbrefusesCOMMIT,ROLLBACK(butROLLBACK TO),BEGIN,START TRANSACTION,END,ABORT,PREPARE TRANSACTIONandCOMMIT/ROLLBACK PREPARED, in a string of many statements too, and any statement naming the transaction's timeouts (transaction_control); andkeg.thread_appendrefuses atool.resultoutside the transactionkeg.thread_actbegan. A tool that randb.query('COMMIT')had kept its change with its result written apart. - A thread ends once, however many end it at once. Threads are locked parent before child everywhere, and a thread is looked at again once locked: one already ended is left alone, with no second end, no second
keg.thread.finishedand nothing given back twice, and a thread that has ended starts no child. A parent stopped while its child's worker ended the child had deadlocked, or could end the child twice. - A tool's
dbruns exactly what it checked: one statement, as text (query_refusedotherwise). A query object ({ text: 'COMMIT' }, a prepared statement, a cursor, one with its ownsubmit) passed the check as[object Object]and then ran; a text of two statements is refused whatever they are, a;in a quoted text or a comment, or at the end, being none. The database's own refusal of atool.resultoutsidekeg.thread_act's transaction stays the wall behind it. - Another organization can neither lock a thread nor learn by waiting that it exists. A thread's row is locked only once the caller is known to have it (its organization, or its lease's token), as a condition of the read, of its parent's lock and of its own; one that is not the caller's is "there is no thread" at once, as one not there.
- The check for sealed values fails closed. A secret the node cannot open, or a vault mark that is not a length, a digest and a roll, makes the app's door refuse the call (
503 sealed_unreadable, in a sentence) and a tool's result be withheld, and the node's log names which, never its value; it had been passed over without a word. A secret the vault's carry-over could not open and left in place now does this until it is removed or set again. - The apps' door on the bridge is reached from the bridge and the node only. The node's own rules, made on every node with the bridge's masquerade whether or not anything is walled (iptables's INPUT, and a chain of nft's
kegtable), and put back by the half-minute re-check, drop what comes to the bridge's gateway10.88.0.1by any other way in but what the node sends itself, and the door closes a peer outside the node's loopback and its containers' range before reading anything. A host on the node's network that routed10.88.0.0/16through the node could reach the door. - The client an app is given (
keg app new,keg app client, a work's/keg/app-client) carries its agent files,src/agent.js,src/model.jsandagent.d.ts. - A flood of connections that send nothing no longer keeps an app out of its door to the model. When the door's pool of connections not yet signed (64 in all, 16 from one address) is full, a new connection closes the oldest of that pool (of its address, or of the busiest address) and is let in, where it was closed itself; one younger than 50 ms is closed only when none is older. An app sends its handle within milliseconds and leaves the pool, so a flood renewed from its own address (the loopback, or the Mac's relay, shared by every app) only closes its own.
- The kubeconfig leads to this cluster. Where another program on the Mac already had port 6443 (another cluster, say), the API was not reachable at all and the kubeconfig named 6443 anyway, leading to that program. The API now goes on the next free port, the kubeconfig names it, and it stays there from one start to the next.
- The cluster's API is published on the node's loopback only, not on every address of the node: on a Linux server it was open to the network (a client certificate was still needed).
keg k8s startno longer fails at random withcgroup ["kubepods"] has some missing controllers. Asking the cluster whether it was ready while k3s was dividing its cgroups made the kernel refuse k3s; the start now waits for k3s to begin.keg saveof an image Keg built is accepted by containerd. Keg's store names a built image's base layers by their packed digest where containerd checks them unpacked (wrong diff id calculated on extraction);keg savewrites the config and manifest as they should be.keg k8s kubectlat a terminal is connected to it, soexec -it,logs -fand Ctrl-C work; a manifest can be piped in (apply -f -), and-f FILEsends a file on this computer, which kubectl in the container could not see.port-forwardandproxy, which would listen where nothing here reaches them, are refused in words.- Importing from another Docker engine works the same once
dockertalks to Keg.keg migrateand the Mac app's Import (Settings ▸ Docker) know each engine by where its socket really leads, ask it what it is, and talk to it by that socket withDOCKER_HOSTandDOCKER_CONTEXTcleared, so which context is current never matters. A context that now leads to Keg itself is said to, with the engines that are really there offered instead; Docker Desktop's, OrbStack's and Colima's own sockets are found directly when no context leads to them (--from docker-desktop,orbstack,colima,colima-PROFILE, or a socket). An engine that is not running is said to be, with how to start it.keg migrate --list(--jsonfor the app) lists them, and the app offers only those, running first; it no longer reads Docker's contexts itself. keg docker restoreputs back whatdockertalked to beforekeg docker use: the context that was current, and the keg context taken away again whenkeg docker usemade it. Runningkeg docker usetwice still goes back to what was there first. The app has Put docker Back as It Was.
[0.12.1] — 2026-11-24
Fixed
- A Linux container no longer takes over a second to start, or to answer, after many containers end at once. Taking a link off the node's bridge holds the kernel's network lock for a whole RCU grace period, and a start needs that lock to make its network namespace and its link: after
keg rm -fof 140 containers the next start waited 570–800 ms, and one in a few runs answered its first request after 1,056 ms, because its port on the bridge did not yet pass traffic and the first connection was tried again a second later. Containers that end are now cleared away one link at a time, each network namespace kept until its link has gone so the kernel never takes many away in one hold, a start connecting is let go first, and a container with its own address starts only once its port passes traffic. After the same removal the slowest start answered in 290 ms and none over a second (three runs, 300 starts). The density run's "one start over 1 s" was this. - A request no longer waits for SQLite to copy its log back to the disk. The commit that took the control database's log past a thousand pages copied it back itself, waiting for the disk while holding the one connection every request needs; a container's start waited from 100 ms to 1.7 s for it. A connection of its own does it now, at most every ten seconds. 600 starts with 100 present: slowest 70 ms (254 ms before); without a published port, 21 ms.
- The control database's log no longer grows without end on a busy node. SQLite writes its log again from the start only once all of it has been copied back, and with commits going on as it is copied that may never happen: with starts every few milliseconds it grew by 5 MB a second, to 2 GB in seven minutes. Past 64 MB it is now copied back in full and emptied, when no one is writing or reading it; over 13,000 starts it stayed under 69 MB.
- A Linux node starting a few dozen containers a second no longer drops what is sent to new ones. Every container has an address none had before it, and the node kept what it had learnt of those gone until the kernel collected it; past 1,024 the kernel refused to learn new ones ("neighbor table overflow"), and every 922 starts a container answered its first request one to more than ten seconds late. A container's entry now goes with its link.
- A node with the common limit of 1,024 open files no longer refuses containers at about the 140th. The Linux driver holds a few files for each container; it now raises its own limit to the most the node allows, and gives what it runs the limit it was given.
- The Mac app offers an update with its notes. The update feed's item carries the release's notes (
docs/releases/notes-<version>.md, as<description sparkle:format="markdown">), which Keg ▸ Check for Updates… shows above Install Update; 0.12.0 was offered with a version number and nothing about it. The release job stops if the notes are missing.docs/RELEASING.mdsays what may be mended by hand in a published feed. - Every button in the Mac app's toolbar can be pressed with VoiceOver, Voice Control or Switch Control. A button alone in its toolbar place (New Work…, Approve and Reject a change, Run a Container…, New Machine, a machine's Terminal, Start, Stop and Remove, a network's Remove, Install from a Folder…) was listed to them as a button and did nothing when pressed; each is now in a group, where it is pressed as it is with the mouse.
- The Mac app's copy buttons beside a command, and its menu bar item, say what they are to VoiceOver: Copy, and Keg, where they were a picture's name or nothing.
- Storage's Clean Up sheet keeps its question, Cancel and Remove in reach however much there is to tick. One line was added for each volume, and the sheet did not scroll: with 40 volumes the question and both buttons were drawn outside it. What may be ticked and what goes now scroll between them, and the sheet is shorter on a short screen.
- Needs you keeps a waiting piece of work readable in a narrow window or a long language. Its four buttons go under the question where there is not room beside it; at the window's smallest, in German, the question was left a column three words wide.
- Storage's "Conversations with the assistant" is a sentence to translate, where it was English in every language; it waits for its translations (
app/Localization/untranslated.json). - The Mac app answers at once while a piece of work with a long difference is shown. What it changed is drawn as one text, where each of its up to 3,000 lines was a view of its own: opening a work with a 3,000-line difference kept the window from answering for 0.9 to 2 seconds, and is now about 0.15 s.
- A container's long output opens without the Mac app stopping to answer. What arrives is built into lines apart and handed to the pane once, and only the 5,000 lines kept are read; each line was added to what the pane held one at a time, copying all the lines before it, and the first read of a 20,000-line output kept the window from answering for 1.3 to 1.6 seconds, now about 0.16 s.
- New work asks the node about the project folder once it is left alone a moment, not at each letter typed into it.
- The Mac app writes every size one way, as the console and
keg cleanupdo: in thousands, with one figure after the point under ten. Overview wrote the disk in 1024s and Storage in thousands, 26.08 GB and 28 GB for the same disk; memory, a container's rates and its files are written the same way now, and the count under Images counts an image's layers once however many names it has, as Overview does. - Storage's Clean Up sheet says "These go." only when something does. With nothing ticked that would be removed it said so above an empty list; it now says only what is never removed, "Nothing would be removed." in bold as the console does, and Remove cannot be pressed.
- A button the Mac app draws once a row says to VoiceOver which row it acts on. Settings ▸ Linux Machine's shared folders each had a button named only "Remove"; it is "Remove the shared folder …" now. The same for a container's Stop, Restart, Start and Remove in its row, Needs you's Review, Approve, Bring Up to Date, Send Back… and Reject ("Approve work 12"), a delivery's Retry and Skip, a Keg service's Open, Install…, Start, Stop, Remove…, Allow…, Stop Asking and its secrets' Set…, an app's Retry Failed, and Compose's Show Container.
- The Mac app's Text size makes all its text larger or smaller, captions, callouts, headlines and Needs you's rows with it, each in proportion to the Mac's own size for it; only text with no style of its own changed before. The Interface font reaches them too. At Standard each is the Mac's own style, as before.
- The Mac app's 22 sentences that waited for translation are in its 37 other languages: Storage's "Conversations with the assistant", Clean Up's sentence for nothing to remove, and the names given above to buttons drawn once a row. They are machine translations that no native speaker has read yet.
- The console's "Keg is not answering" page keeps what went wrong inside its box, however long a word it holds.
- On a phone the console's filter takes room only while it is open. Shut, it was 112 px of blank beside its magnifier, which cut the page's name ("Con…") at 320 wide.
- The console asks for what only its Events page shows only while that page is open: who listens, what was delivered (148 KB on the demo node), what waits and the timers came with every refresh on every page. A refresh elsewhere is now 27 requests and 188 KB, from 31 and 335 KB; the Events page fills about 50 ms after it is opened. The failed deliveries, which the sidebar counts, are still asked for always.
- A list of hundreds in the console is drawn 200 rows at a time, with "Show 200 more of N" below it. Each redraw of 500 containers built and compared every row, about 50 ms (up to 80) every 2 s while their use was shown; it is about 20 ms now, with 6,000 elements on the page rather than 15,000. The row shown in the pane is always drawn, and Select all still selects every row.
- The console asks for containers' use only on the pages that show it.
/v1/stats, and a redraw of the whole page after it, came every 2 s on every page; elsewhere than Containers that was 30 requests and 30 redraws a minute for nothing (Overview at rest: 30 requests and 30 redraws a minute before, none now). Opening Containers asks at once. - On a wide screen the console's prose is at most 100 characters a line: a work's brief, its findings, the assistant's turns, the guide and notices ran to about 200 at 1920 and 2560 wide.
- What a finger presses in the console is at least 44 px each way below 768 px wide, or wherever the pointer is a finger: buttons and icon buttons (28 to 30 px before), tabs (24), fields, the drawer's links, table rows (34) and their sort buttons, row actions (24) and links in lists. A table's checkbox is ticked by a tap anywhere in its 44 px cell, which used to open the row instead.
- No text in the console is smaller than 12 px. The sidebar's counts and badges, keys, chips, tags, times, an image's letter, a chart's foot and a diff on a phone were 9 to 11.5 px.
- With reduced motion asked for, the console's loading shimmer and the filter's widening no longer move.
- A long name no longer breaks the console's layout. A title, branch, path or name of 200 characters with no space in it ran past the edge of a work's page (its title and its Project and Branch cut off), made a dialog scroll sideways with its title out of sight and its close button squeezed, pushed the Containers table's other columns out of view, and widened the Work list. Such names now break where they must; a container's name in the table is cut with an ellipsis and given in full on hover and in its pane. On a phone a message (a toast) now stands clear of both edges.
- The console's sidebar on a phone is used with the keyboard. Shut, its drawer's 25 or so links were still reached by Tab, out of sight, before the page's own; now they are not. Opened from its button, the drawer takes focus at the page it is on; shut by Escape, its backdrop or a link, focus goes back to the button, which says whether the drawer is open.
- A click on the console's magnifier opens the filter. The icon was drawn over the field and took the click, so pressing the middle of it did nothing; only its edges, or
/, opened it. - The console's toolbar keeps a page's actions in sight on a phone. At 320 and 360 wide, Containers' Run Container and More were past the edge of a row that scrolled sideways with no scroll bar; the row now wraps.
- The console no longer stays on its loading page for good when one request is never answered. A refresh waited for every list it asks for, so a single request lost on the way (seen after a reload, with
/v1/imagesor/v1/volumesnever reachingkeg ui) held the page in its skeleton, and every later refresh behind it, until the tab was closed. Each list, and the ping before them, is now given up after 8 seconds and the refresh goes on with what was known.
[0.12.0] — 2026-11-24
Added
A piece of work's agent reaches its model through Keg's gateway, and is given no key. With the gateway set up (
keg assistant setup,modelsrunning), each round of a work has a door of its own: a socket in the work's/keg/model, which only its machine is given, read only, carried to a port of the machine's loopback by a bridge Keg leaves there (node), answering OpenAI's Chat Completions (POST /v1/chat/completions, streamed or not, tool calls both ways). The runner points Pi at it as a provider of its own (models.jsonin a folder of Keg's making,openai-completions), with the round's random token in Pi's environment and no file; the node keeps only the token's sha256 and forgets it, and removes the socket, as the round ends, so another work's token, an earlier round's or none is refused (401). What Pi sends is translated into the node's own call (instructions, messages, tools, tool calls and results, carried as data; an image is said to have been there) and answered by the gateway with its own address, organisation and key: an unknown field (base_url,n, …) is refused, and no header reaches the provider. The work asks the model a person set for works,keg assistant model --works <model>(the default until one is set;ModelSettings.works), and a request naming another is refused (400 model_not_allowed); the project's recipe's provider and model are not used then. Each call is held and settled aswork:<N>under the work's ceiling ($2 a day) and the node's, at the works' model's price; a call cut off is counted at what the gateway reports in time, else at its worst. A day's ceiling reached answers429 insufficient_quotawithx-should-retry: false, and the round ends with the node's own sentence, which the gate shows; calls a minute or at once answer429withRetry-After. Bounds: 4 MiB a request, 16 KiB a head, 4 calls of a work at once, and the gateway's own (1 MiB and 5 minutes an answer, 32,000 tokens out). Nothing of what was asked or answered is logged or in an event. The work's evidence,keg work showand the console say for each round which model the agent reached this way and what the round spent. The project's.envis read only on a node with no gateway set up, as before, and the round says so; a gateway set up and stopped fails the round with a sentence and never falls back.docs/ASSISTANT.md("Pieces of work reach their model through the gateway").gRPC, and any HTTP/2, through Keg's names. A service whose
keg.yamlsaysrun.protocol: h2cis reached with HTTP/2 at<app>.keg.localhost: with prior knowledge on the names port (as a gRPC client dials) and over HTTPS by ALPNh2, so a Go app's gRPC no longer needslocalhost:<port>. Keg ends the caller's HTTP/2 and checks each request before sending it on: the first chooses the service by:authority(over TLS it must be the certificate's name), and a later one for another app on the same connection is answered421and sent nowhere, so one connection reaches one app.CONNECT, plain or extended, is refused (405), as over HTTP/1.1. A service that has not saidh2c, a container run by hand, the console and Keg's own services are offered and answer HTTP/1.1 only (505to HTTP/2), as before. The caller has 30 seconds for its first request, headers are held to 32 KiB, a connection to 100 requests open and the node to 256 such connections, of which one name may have 64, and past 192 only a name with fewer than 8 is let in, so a caller holding many to one app (or a few) leaves room for the rest.docs/PROTOCOL.md("HTTP/2 and gRPC through the names").The node hands out its Go client as it does
@keg/app.keg app client --go(the default in a folder with ago.modand nopackage.json) brings a Go app's copy up to the node's, into the folder itsgo.modreplacesgithub.com/rahult/keg/sdk/gowith (third_party/kegunless it names another folder of the app's, never undervendor/), file by file, never through a link;GET /v1/app-client/go, a person's, gives it; and a piece of work finds it at/keg/app-client-go, withvendor.shto bringthird_party/kegup to it. Its version isgo-and the start of a digest of its files.The Go client's audience of roles and users at once.
tx.Emit(ctx, type, payload, keg.To(keg.Roles("agent"), keg.Users(customer)))is read by whoever is in either, as@keg/app's{ to: { roles, users } }is;To()with nothing, the organization beside another, or a kind said twice is refused withkeg.ErrAudiencebefore anything is sent. The vectors are@keg/app'stest/emit.test.js.A project names the image its works run in.
work: { image: "golang@sha256:..." }inkeg.yamlis the image of a piece of work's machine, where its agent and its checks run, when the work was not made with--image: so a Go project's works can have Go andprotoc. It is read from the commit the work begins from, so it is what a person merged, never what a work writes for itself, and it must be pinned by its digest (a tag could move after the merge). It runs within the work's walls, as the defaultnode:22-bookwormdoes, and is given nothing more. Keg's own machine for the work, which runs Keg's git on the project, runs Keg's default whatever image the work is made with (work.image,--imageor New work's field, which are for its agent and its checks), so it never runs from an image a person typed or a tag that moves, and an image without git (alpine:3.20) makes a work too.run.health: { grpc: "" }: a release is ready when gRPC's own health check says so. Beside an HTTP path and a command, Keg asksgrpc.health.v1.Health/Checkover HTTP/2 without TLS onrun.port, for the whole server ("") or a service by its full name (notes.v1.Notes), and takes the release as ready only onSERVINGwithgrpc-status: 0; anything else, or no answer within 2 seconds, is asked again until the 30 seconds a release has. It needsrun.port. A Go server answers it withkegrpc.Health.A service can be sent an app's past events. A binding to an app's events that says
from_start = trueasks, in the install question, that "it is sent every event ofthat is still kept, from the first"; allowed, the relay keeps a place for that binding in each environment and sends it, to it alone, each kept event of its types it was not told of as it came, as far as what had committed when it was bound, at most 500 waiting for it at once (so it never nears the backlog at which it would miss new ones) and within the app's 1200 a minute. keg system lsand the console say how far it got. A reinstalled query service no longer starts from nothing when its manifest asks for this. Without it nothing changes: a new binding hears what comes after it is allowed.docs/PROTOCOL.md.keg app remove <app>. A person removes an app, typing its name (or--yes <app>in a script), or with Remove… on the console's Apps page: it is stopped in every environment here and nothing starts it again, each service bound to its events loses that binding and the token it held, and those services are named. Its database is kept for deploying it again unless--with-data, which says first which databases go, with every row in them, and then drops each with its roles and the passwords Keg kept for them. Each step can be taken again, and an environment's record of the app goes only once its data has, so a removal that failed part way (Postgres stopped, say) is finished by running it again; once an app is removed with its data kept,keg app remove <app> --with-datafinds that data by the app's name and removes it. Refused to agents, services and the assistant.docs/PROTOCOL.md.Security:
keg.tenant_ref, a reference between tenant tables that names only the same organization's rows. Postgres checks a foreign key without row security, so a plainREFERENCES suppliers (id)from one tenant table to another let an organization name another's row, and learn whether an id exists by whether its write was refused.SELECT keg.tenant_ref('app.orders', 'supplier_id', 'app.suppliers')(capability file 013) makes the reference(organization_id, supplier_id)to the parent's(organization_id, id), with a unique index on the parent's pair if it has none, in place of the column's plain key and doing on delete what it did: another organization's id is refused exactly as a missing one (the same 23503, word for word). The guide anddocs/PROTOCOL.mdsay when it is needed.The console's and the Mac app's New work ask for the machine's image when the project's
keg.yamlnames none (work.image): a Go project's work no longer needskeg work new --imagefrom a terminal. Where the project names one, the dialog says which. The node checks the image as it checks--image, now before anything of the work is made (invalid_reference, where a bad name used to leave a half-made work's folder behind).POST /v1/work-project-inspect, a person's, says what a folder's project names.A first round's tests are said against its base. At a first round's gate there was no earlier count, so a round that added no tests looked like any other ("47 tests as printed").
keg work show, the console's work page and the Mac app's now say a first round's count against what the branch it merges into was last checked with, the last round of the latest work merged into it in the same project: "e2e: 47 tests as printed, as on main: no new tests", or "unit: 9 tests as printed (main had 5, as work 12 was checked)".GET /v1/work/<id>/base-tests.keg vm disk --path <folder>: the Mac's VM disk on another volume. The data disk lived only in Keg's own folder, and a link made by hand was the only way to put it elsewhere. Now, while the VM is stopped,keg vm disk --path <folder>moves it there (a rename on the same volume; on another, only what it holds is copied, hole for hole, and the old file goes once the new one is whole), leaving a link in Keg's folder, which the VM opens through. The disk's folder and any folder containers may write to (shared withkeg vm shareor--share, or an agent's workspace) never meet: the disk is not moved into one, below one, or into a folder holding one, and a folder is not shared, or made an agent's workspace, where it is in the disk's folder or holds it (Keg's own folder included); paths are compared through links, whatever their case, and by the device and inode of each folder, so a folder reached by a firmlink (/System/Volumes/Data/Users/…) is the folder it leads to. The link in Keg's folder is replaced in one step, made under a name of its own and renamed over the old, so the VM never finds no disk there; the disk is put in its new folder before the old is let go; andkeg vm disk --pathwith Keg's own folder moves the disk back there, in the link's place. A running VM is refused.keg vm disksays where it is. A link made by hand is taken the same way, and a VM whose linked disk's folder is not there (a volume not connected) no longer starts on a new, empty disk: it says so and stops.
Changed
- What a person approves is what is merged. Approving a work deployed the work's own build even when the branch it merges into had gained commits meanwhile, so
localand the environment approved into ran code without them, and Keg only said so. Now a work that is behind its base cannot be approved: the gate says how far behind it is and offers Bring up to date (keg work update <N>, a person's alone), which merges the base into the work's branch in its machine, runs its checks again on the combined code, builds and runs it inlocaland asks again; approving that merges and deploys the build of what was merged. If the work's copy cannot be made again once its branch has moved, the branch goes back to where it was, so the work is still asked about as it was and can be brought up to date again. The files in conflict are said in the console and the Mac app as in the round's note, at most 20 and with any character that would turn the text around written out (the Mac app said "brought up to date" even when the work had gone back to its agent); so are the work's diff, its branch, its base and its evidence, wherever a work's files, branches or summaries are shown. Where the base and the work conflict, the work goes back to its agent for a round, with the files in conflict as the round's note and the merge begun in its directory. In the console's Needs you and work page, and the Mac app's.
Fixed
- Security: the node ends a command in a work's machine at its time limit itself. The limit rested on a
timeoutprogram inside the machine, which an agent could replace; now the node stops the machine a little past the command's time, whatever is inside it, and the machine starts again when it is next used. A round's door to the model closes with it. - On a Mac, short connections to an app are no longer closed without an answer. At 20–40 callers at once, 1–16% of connections to any app, on
localhost:<port>and on its name, were closed with nothing sent: the VM's relay listened with socat's queue of 5 not-yet-taken connections, and a virtio socket refuses the sixth at once. It now queues 1024, the VM's helper asks again for up to 3 seconds when the VM refuses (and says inhelper.loghow many it had to), and the Mac's forwarder waits up to 2 seconds for the helper's socket in the same way and says inforward.logany connection it could not pass on. Each connection was also held half a second after its answer (socat's linger), so a caller that waits for the close, asConnection: closedoes, waited that long, and an answer slower than half a second to a caller that had half-closed was cut off unsent: the VM's relay is nowkeg vm-relay, which passes each direction to its end, tells the caller at once when the app has finished, and closes the connection 0.5 s later only if the caller has not. 40 callers at once to SupportDesk went from 75 to 400–900 answers a second, none lost. Under sustained load the time each connection took also rose, run after run (41 to 427 ms at 40 callers), and fell only once the load had stopped for a while: every relayed connection asks the node which ports are open, and the node read the whole of/proc/net/tcpfor each machine to find the ports it listens on, a table that holds every connection that has ended and waits out its TIME_WAIT, about one per request for a minute. With 5,500 of them a single caller's request took 10 ms where it took 3. The node now asks the kernel for listening sockets alone (netlink), whatever has ended. The forwarder and the VM's helper raise their limit of open files from the Mac's 256 to 10,240 as they start (about 60 streams of events or websockets used to reach it), wait and try again when out of open files rather than closing the caller with nothing sent, and the helper no longer spins when it cannot take a connection. Needs the VM image of this release. - Keg's own refusals are told as Keg's, with their own kind, in both clients.
keg.Publicsaid every refusal raised in SQL asfailed_precondition"refused", so "no one has signed up with that email" fromkeg.add_memberin an app'sTxreached the page as "refused". Keg raises its refusals as plainP0001text; a refusal is now Keg's own when a function of thekegschema raised it (Postgres names it in the error'swhere), and the words Keg's pinned capability files raise give its code and kind:no_such_emailandno_such_membernot_found,administrators_only,not_a_memberandnot_open_to_joinpermission_denied,session_not_validandsign_in_failedunauthenticated,email_takenalready_exists, a password too short or a role not one invalid_argument, said in Keg's words.keg.KegRefusal(err)(Go) andkegRefusal(error)(@keg/app) give the code;@keg/appgainspublicError(error), which says whatkeg.Publicsays. The app's ownRAISE, even in Keg's words, is still "refused". Both clients are checked against the same vectors (sdk/go/testdata/public_vectors.json). - The Go client's refusals reach a Connect client's reader. An error answer says its words in
message, where Connect reads them;keg.Refuseis an app's own refusal in its own words, whichkeg.Public,WriteErrorandkegrpc.Statussay with its kind and nothing of Postgres's text. - A failed job is no longer silent in a Go app.
WorkOnegives*keg.JobFailedfor a job whose handler failed, andWorklogs each failure. - The gate says when a Go test run panicked, where the short count read as tests removed ("5, was 47"); and the check
keg app new --gowrites runsgo test -v, since the gate counts Go's tests from the lines it prints only then. - A page knows whether it is live.
@keg/app/browser'ssubscribereports its connection's state, so a page shows "live" only while it is connected. keg startandkeg restartbring back a release thatkeg stopstopped. Stopping a deployed release's container left it down: start and restart refused it, as nothing a person ran (startablewas false), until it was deployed again. They now start it again from its release, as a restart of the node does, in a new container;keg stopis unchanged.- Security: one HTTP/1.1 connection through Keg's names reaches one app. The name router read the first request's
Hostand then passed the whole connection on, so a later request on a kept-alive connection naming another app (b.keg.localhostaftera.keg.localhost) was delivered to the first app. Every request on a connection is now read, as far as its head and how its body is framed, before it is sent on: one for another name is answered421 Misdirected Requestafter the answers before it, and the connection is closed. Requests two readers could frame differently are refused at the router (400) rather than guessed at:Content-LengthbesideTransfer-Encoding,Content-Lengthtwice or not a plain number, a coding other thanchunked(501), a bare LF or CR, a folded header, a space before a colon, two hosts, an absolute target naming another host, a malformed chunk;CONNECTis405. AnUpgrade: h2cis taken out of the request (HTTP/2 is reached with prior knowledge, where each request is checked). Websockets and other upgrades, chunked and streamed answers,Expect: 100-continueand pipelining are carried as before. Over HTTPS the connection is held to the name its certificate was asked for: a first request for another is421.docs/PROTOCOL.md("HTTP/1.1 through the names") A connection ends with its caller, also one that goes away while its upgrade is answered (it held a thread of the node and both sockets for ever), and one the node has no thread to spare for is answered503while every other is routed as ever.
Upgrading from 0.11.1
- The HTTP/1.1 router through Keg's names is stricter. A request that a service and the router could read two ways is refused at the router where it used to reach the app:
400for a repeated, comma-joined or+NContent-Length, Content-Length beside Transfer-Encoding, Transfer-Encoding on HTTP/1.0, a line ended by a bare CR or LF, a folded header, a space before a colon, two Hosts, HTTP/1.1 without a Host, an absolute-form target naming another host (or with a user in it), and a malformed chunk;501for any coding butchunked;405for CONNECT. A later request on a kept-alive connection for another name is421(after the answers before it), as is, over HTTPS, a Host that is not the name the certificate was asked for.Upgrade: h2cis taken out of the request. A client that sends any of these, or that sends one connection's requests to two apps, must change. - A work behind its base cannot be approved until it is brought up to date (
keg work update <N>, or Bring up to date in the console or the Mac app): the base is merged in, its checks run again on the combined code, it is built again and asked about again; a conflict sends it back to its agent. Work waiting at its gate when the node is upgraded is held to this too. - Nodes before this release refuse the new fields. A
keg.yamlwithwork:,run.protocolorrun.health: { grpc: … }, or a service's manifest withfrom_start, is refused by a 0.11.1 node as a field it does not know. Upgrade every node a project deploys to before committing them. - Capability file 013 is given to each app's database at its next deploy, and only adds a function (
keg.tenant_ref); nothing changes until an app calls it. Calling it builds a unique index on the parent's(organization_id, id)if there is none, withoutCONCURRENTLY, so writes to the parent wait while it is built, and checks the new foreign key over the whole child table. On large tables, call it in a migration of its own, at a quiet time. - The Mac's fix for connections closed without an answer needs this release's VM image: the relay in the VM is
keg vm-relayfrom it. The app brings the image with it; Stop Keg and Start Keg once it has updated. - What
keg.Public,publicErrorandkegrpc.Statussay of Keg's own refusals has changed. Each is now said in Keg's words with its own kind, where every one wasfailed_precondition"refused": signing in with the wrong password isunauthenticated"that email and password do not match", signing up twicealready_exists"that email is already signed up", adding someone not signed upnot_found"no one has signed up with that email".WriteError's answer gains amessagefield besideerror. A page or test that matched "refused" for these must match the new words or kinds; an app's ownRAISEis still "refused". - HTTP/2 through the names is shared and bounded. It is offered only to a release whose
keg.yamlsaysrun.protocol: h2c; the node holds at most 256 such connections, one name at most 64 of them. A gRPC stream over HTTPS is still cut after 60 seconds with nothing sent either way (a client's keepalive pings keep it) and after 15 minutes in all; one over the plain names port lives at most 15 minutes. keg app removekeeps an app's data unless--with-data, and that data can be removed later withkeg app remove <app> --with-data, which finds it by the app's name; a removal that failed part way is finished by running it again.
[0.11.1] — 2026-11-23
Added
- An event's audience can be roles and users at once.
keg.emit(type, payload, '{"roles": ["agent"], "users": ["<id>"]}'), anddb.emit(type, payload, { to: { roles: ['agent'], users: [customerId] } })in@keg/app, is read by whoever is in either: the staff and the one customer a ticket is about, with no event sent twice and none left readable by every member. One of the two lists may be empty; both empty, a list that is not a list, a key not known, a user not a member, more than 20 roles or 100 users are refused, as before.keg.my_events, realtime and a job read it as they read the other forms; Keg's relay carries it as kept; the query service shows a token for one organization only what is for every member, and so not this. Capability file 010 replaces one function: it takes no lock onkeg.eventsand rewrites no row. - Jobs a subscription made no longer outlive it.
keg.off(type, job)now cancels, in the same transaction, the jobs its subscription made that still wait: each is failed, sayingcancelled: keg.off('<type>', '<job>') took back the subscription that made it, sokeg app jobs --failedlists them; one running finishes as it would, and one the app enqueued itself is left (capability file 012, which replaces the function). A person removes jobs for good withkeg app jobs remove <app> --failed,--orphaned(made by a subscription since taken back, still waiting, as a Keg before this one left them) or a failed job's id; an agent and a service are refused it. - The assistant can read why an app's jobs failed. A new tool,
keg.apps.jobs, gives for each environment how many jobs of each name are in each state, and the 20 latest failed jobs with their errors, each cut to 300 characters on one line and with every secret the node holds hidden, as in any tool's result. It never gives what a job was given; the whole list, and putting jobs back, stay a person's (keg app jobs). - A Go client for an app on Keg,
sdk/go. The packagekegis@keg/appfor a Go server, onpgx/v5and the standard library alone:Connect(DATABASE_URL),SignUp,SignIn,SignOut,Organizations,Tx(ctx, session, organization, fn)andAs(ctx, fn)for the session a context carries, held to the app's policies; in a transactionEmitwithTo(Organization()|Roles(...)|Users(...))andAbout(an audience made any other way is refused),Eventsread a page at a time with the JavaScript client's own statements and planner settings, so a page far back is read from the feed's index as the first is (a test on a node reads page 2,000 of 120,000 events with no node of its plan reading more than a page),EnqueuewithRunAtandAsUser,Once;JobandWorkwith its handler run in the job's transaction as the system or the user, a panic or an error rolling it back and the job tried again;ServiceForandServiceToken, byte for byte the JavaScript client's tokens (checked against its own output);RealtimeFor, what a page hands@keg/app/browser'ssubscribe, andSubscribe, the same stream read from Go;HostAllowed;*keg.Errorwith the same codes;Public, an error as a caller outside the app may be told it, never Postgres's text; andSessions, a request's session put in its context for any handler on net/http, Connect's among them.@keg/app's own tests are its integration tests, run against an app's database whereDATABASE_URLis set.kegrpc, a module of its own so an app that does not speak gRPC takes in nothing of gRPC, gives a unary and a stream interceptor that put the caller's session in the context (fromauthorizationandkeg-organization, or a verifier of the app's own) and refuse a call without one, Keg's and Postgres's errors as gRPC statuses, a health service that asks the database, and gRPC beside HTTP/1.1 on the one port Keg gives an app.sdk/go/example/goprobeis a Go app built with it: a 16 MB image from scratch, about 16 MB resident at rest. keg app new --go NAMEwrites a Go app to start from:keg.yaml, a Dockerfile that builds a static binary onto an empty image,go.modandgo.sumthat build as the folder is, a server that answers/healthz, a migration, and Keg's Go client inthird_party/keg(nevervendor/, which Go takes for its own).
Changed
- Events of one transaction are read in the order they were emitted. They share their time, and a feed (
keg.my_eventsby(at, id),db.events()) gave them in the order of their random ids: the same at every read, but not the order they happened in. An event's id is now made in order (the transaction's time, then when in it the event was emitted, then random bits), so(at, id)is the order emitted, with nothing that reads it changed: the view, its indexes, how deep a page is read, anddb.events({ before }), whose cursor is the last event's id, so a cursor handed out before still works. Keg's relay carries a transaction's events to NATS and the query service in that order too. Events written before keep their ids and their order. Capability file 011 changes one column's default.
Fixed
- Security: an app cannot name a variable the node sets. An app's
run.envorneeds.secretscould nameKEG_APP, a service'sKEG_SERVICE_<NAME>_TOKEN/_URL,KEG_REALTIME_URL,DATABASE_URLorPORT; the release was given both, its own first, and a program reads whichever of two it finds first. A deploy that names a variable beginningKEG_, orDATABASE_URLorPORTwhere the node gives them, is now refused, saying which; the node's value is the only one. - A work's question, and its record once merged, say when
localdoes not run the merged branch. What runs inlocal(and what approving deploys) is the work's own build; when the branch it merges into has commits it does not (another work merged meanwhile), approving leftlocalwithout them untilkeg dev -d, and said nothing.keg needs, the console's Needs you and the work's page now say how many commits the work lacks and the one command that runs the branch as merged (keg dev -din the project); after the merge,keg work showsays it again. Keg does not rebuild the branch by itself: that is a build of the person's project, theirs to start. The gate'sbehindfield carries it (GET /v1/needs). - The assistant's events tool takes an empty cursor as none.
keg.events.listwith"after": ""was refused ("" is not a cursor this node gave); a tool's argument given as empty text is now left out of the request, as one not given is. keg cleanupno longer calls a work stopped at the gate finished. A work rejected at the gate is stopped, not merged, andkeg work retrytakes it up again from its folder; cleanup listed it as "Finished" and, with finished work cleared by the node, cleared it by itself after its days. It is now said as it is ("Stopped at the gate, not merged", with the command that takes it up again), and is cleared only when a person ticks it (--works); a merged work is cleared as before.- A port of Keg's own that moves along on a Mac no longer lands on another of the node's. With another Keg holding 7346, a second node's console was opened on 7347, its own realtime gateway's port, which was then pushed to 7348; the forwarder now passes over every port the node has, and lets go of one remembered there from before.
- Ask on the console's Command page works. A redraw (every few seconds) copies the box's handlers onto the page's own textarea from a fresh one that is never shown, so Ask and Enter read that empty one and did nothing; the box now reads what was typed in the page. Asking from the command palette was not affected.
- The Builder's "Ask for something" box is drawn, and the console keeps working after the Builder's first page. It had the same name as the Command page's box, which replaced it: the Builder drew none, and every later redraw on any page stopped part-way with an error until the page was loaded again. Storage's "What is kept" also saved the numbers it was drawn with, not those typed, once the page had redrawn; it now reads the page's own fields. Every other box the console draws was checked: they are in dialogs or kept parts, which a redraw does not replace.
- The gate's test counts no longer list what the checks service only says of a round. A work that added a check showed, under "tests, against the round before", a line
this work changes the project's checks (added: tests unknown, made from the checks service's note that the work changes them;keg work show, the console and the Mac app now count only checks that ran.
[0.11.0] — 2026-11-23
This release lets services from outside be trusted with more (NATS, a query service, tokens for an app and for one organization), gives apps more of what they need (turning table commands off, who an event is for, jobs a person can see and put back, checks with a database and with services), hands a piece of work the files it needs, cleans up the node's disk, makes the Mac's Linux machine smaller, and adds a command center: an assistant in the console that reads the node and proposes changes, each carried out only when a person confirms it. Read "Upgrading from 0.10.0" before upgrading a Linux node.
Added
- Ask Keg, in the console. The command palette takes words as well as page names: a page's name opens it with no model asked, and anything else is asked of Keg's assistant, whose answer opens in a panel beside the page ("Open in Command"). The Command page (
#/command) keeps each conversation on the node, and shows each turn as it is answered: what was asked, a row for each tool it called, with the node's words of what came back and a link to the thing, the answer as plain text, what was read, and what was sent. It says that anyone with the console's link can read the conversations. A link in an answer is a link only when it is one of the console's own pages, or something read in that turn; anything else, and anything else the model wrote, is text. The assistant is off until a person runskeg assistant setupwith a model provider's key (below).docs/ASSISTANT.mdsays what it can and cannot do. - What the assistant reads. It reads what a person reads, through 28 tools whose every request the node builds itself: containers (their state, ports, how each is made and the last lines each printed), volumes, images, networks, machines, builds, events and deliveries, pieces of work with their evidence and diffs, services of an environment, Keg's own services, apps with their jobs, environments, change sets, backing services, what waits for a person, what the node uses and what takes space on its disk; and it opens the console's pages. It never reads a variable's or a secret's value: each result has every secret the node holds hidden before it is cut to 64 KiB, and a container's command line is left out. What it reads is sent to the model's provider, log lines and what programs wrote among it; that text is given to the model as a tool's result, never as the person's words, and a card says when the assistant read something a program wrote before it proposed a change.
- Changes the assistant proposes, and a person confirms. The assistant may propose 16 kinds of change: start, stop, restart, pause, resume or remove a container; start or stop a machine; retry or skip a delivery; fetch or remove an image; remove a volume; take a Compose project down; promote a release to an environment, or roll one back. A proposal is a card in the node's own words, naming each thing by the node's name for it and saying whether it can be undone; the model's own words never reach it. Nothing is done until a person clicks Confirm on it, in the console's Command page or Needs you, or the Mac app's: then the node carries out exactly the request it stored when it was proposed, as the person who clicked, once, and only within ten minutes. Decline, or ten minutes, and nothing is done. At the click each thing the card named is looked at again by its identity (a container by its id, a volume by its folder, an image by its digest, a service by the release it runs, an environment by where it is and its policy), and a card whose thing has changed is withdrawn. A run proposes one change at a time and five a turn. Removing a container a service is deployed as undeploys that service, and its card says so ("It is the service web in production: it is no longer deployed there until it is deployed again"). A promotion or a rollback is carried out as the person who clicked, so into an environment that applies releases without approval it is deployed at once, and its card says which: "staging applies a release without approval, so it is deployed at once", "production needs approval, so it waits there for a person to approve it", or, for an environment on another node, that it is sent there with the person's invitation. A delivery's card names its event's type and its subscription. The container of a service Keg runs (its own, as the console, the gateway and the assistant, or one installed from a folder) is never proposed: a person starts and stops those on the System page.
- What the assistant can never do, whatever it reads or is told: approve or reject a gate or a change set, install, replace or remove a service, read or set a secret, set a model's key, limits or allowances, change what this computer reaches, run a cleanup, share or expose anything, begin work or hand it files, or confirm or decline its own proposals. None of these is a tool, even as a proposal, and a test fails if one becomes one. The assistant runs walled, with no network at all and nothing but its socket; only Keg's model gateway reaches the provider.
- Needs you shows the assistant's proposals. The console's and the Mac app's Needs you list a waiting proposal as its card, with Confirm and Decline, for a person alone: the assistant, a service and an agent reading what waits see nothing of its words or its request.
keg needsprints its words and that a person confirms it in the console. The node writesconfirmation.asked,confirmation.answered,confirmation.usedandrun.waitingevents, which carry ids and states only. On a card, every value a program or the model wrote (an argument, what the person asked, what was read, how it went) is one line, its line breaks, control, bidi and zero-width characters shown escaped and a long one cut and marked so, and what was read is in a box of its own marked as a program's. - The Mac app has Command, the console's page at its simplest: the conversations, one opened with its turns as text and the same steps and cards, a box to ask Keg in, and what the assistant spent today.
keg assistant setup --env-file <path>takesOPENAI_API_KEY(andANTHROPIC_API_KEY, kept for a later version) from a.envonce, on the person's terminal, prints the names it found and never a value, seals the key for Keg's model gateway, installs and starts the gateway and the assistant, and makes one check call. Without--env-fileit asks for each key unseen. After it, nothing reads a.envfor a model.keg assistant keyssays which are set;keg assistant modellists the models offered and their prices, and sets the one asked by default.- Keg's model gateway,
models, the one thing on the node that holds a model's key and reaches a provider (OpenAI's Responses API, streamed), from behind the walls a service from outside has: an address of its own on the bridge, the public internet only, no capability, its memory capped. It claims each call from the node with a held request; the node never connects into a folder a container can write. The key is read for each call and is in no frame, log line, event, error or answer. The assistant runs walled too, with no network at all. - What models may cost, held by the node. Every call is held at its worst case (a token for every byte it sends, the framing besides, and the output it may have, at its model's price) against its caller's allowance and the node's before it is forwarded, and settled at what the provider counted: the assistant $5 a day, each piece of work and each app environment $2, a person's own calls $1, the node $20 in all, each changed with
keg assistant limits <key> --usd-per-day N(or--per-minute,--tokens-per-day, for a caller, a kind asdefault:<kind>, ornode). Over a limit a call is refused with 429over_limit, saying which and when it resets. At most 16 calls are answered at once, 4 kept for the assistant. A provider that reports more than could be is counted at no less than what was held and stops its caller until a person runskeg assistant limits <key> --resume.keg assistant usageshows what each caller spent and has held, a day at a time;model.usedevents say the caller, run, model, counts and spend, never a prompt or an answer. - Runs, kept on the node. An agent's work on a request is a run, its steps written by the node itself (what was asked, what the model said, each tool and its result, what the model used), held to 200 steps, 50 tool calls and 30 minutes, and read with held requests (
GET /v1/runs/<id>?after=&wait=).run.startedandrun.finishedcarry ids and states only, and reach only the run's owner. Conversations are bounded: 200, for 30 days, 256 MiB of steps, the oldest going first. - Keg's tools, a catalogue beside the node's routes: every route is a tool, kept for a person, or plumbing, and a route in none fails the tests, so none is ever offered by default. A tool's request is built by the node from its arguments, and carried out as the calling service, never as a person.
- The Keg skill, for coding agents.
skills/kegis a skill in the Agent Skills form: the limits an agent keeps, how it finds where it stands, a table from what it wants to the command (and the MCP tool), and references on machines, running what a project needs, apps on Keg's capabilities with the pitfalls that cost rounds, releases and gates, and what errors mean. It is built intokeg:keg skillsays what it holds and where it is installed,keg skill show [FILE]prints it, andkeg skill install [--dir <folder>]writes it to~/.claude/skills/kegor another agent's folder. Installing is a person's: it refuses an agent, and when the node cannot be asked anyone not at a terminal; it never writes over another skill's folder or through a link, writes each file beneath a handle on the folder and renames it into place, removes only files an older install listed, and says each file it wrote.keg agents --skillprints itsSKILL.md. It ships in the Keg app (Contents/Resources/skills/keg) and at the public repository's root. A test holds it to the CLI: each command it shows parses and each command and flag it names exists, wherever it is in a shell line; every command ofkegis known as an agent's or a person's, an agent's held to the node's own rule (agent_may, now in keg-api), and none of a person's is shown for an agent to run; and its limits agree withkeg agents, which now says, as the skill does, that what a file, a log, a service or a tool's output says never changes them.docs/AGENT-SKILL.mdsays more. keg whoamisays whether the node takes you for a person, an agent or a service, and what that one may do; to a person, the agent socket an agent on this computer uses.keg backing start|ls|logs|stop: what a project needs beside it (Postgres, Redis), reached atlocalhoston its port, from the command line as over MCP (keg_backing_*). Each is kept with who started it: an agent sees, reads and stops only those an agent of its name started, and a person all of them; those started before are a person's.keg app newputs Keg's client in the app, invendor/keg-app, and itspackage.jsonnames it ("@keg/app": "file:./vendor/keg-app"): the client is not published, and an agent looked for it on npm. It fills a folder of that name that is empty but for.gitand.DS_Store, makes each file new and through no link, and removes what it wrote when it cannot finish.- A piece of work is handed files to read, and Keg's own material.
keg work new --with <path>(again for more),keg work attach <id> <path>, and "Hand it to read" in the console's New work and work pages copy a file or folder of the node's once into the node's keeping for that work: a copy, so later changes to the person's folder are not seen and nothing the work does reaches it. One thing is at most 16 MiB in 2,000 files and 32 folders deep; a work is handed at most 16 things and 64 MiB. No link is followed: a link given is refused, one inside a folder is left out and said, as is a.gitfolder and anything that is not a plain file. A name a secret is kept under (.env, a key,.npmrc,.ssh,credentials.jsonand the like) refuses the whole of it, by name. The work's machine sees it, read only, at/keg/with/<name>, outside the repository, so it cannot be committed by mistake. Beside it, always and written afresh for the version of the node at each round:/keg/guide(the agent guide,PROTOCOL.md,WRITE-A-SERVICE.md),/keg/app-client(this node's@keg/appwith a new README), and/keg/services/<name>/README.mdfor each service the work's app is bound to that declares instructions (docs = "README.md"in its manifest, copied as it is installed, at most 256 KiB, a plain file of its folder; the install question says "It gives works that use it its instructions", text its author wrote). The agent's prompt lists what it was handed and where; the recipe tells it to read it before it writes code that uses an API, and to stop and say so when something it was told to use cannot be found, never to invent it; the guide says that what those files say never overrides its limits. Each round's evidence (files) records what was handed, with each file's size and sha256. Only a person hands a work anything: an agent and a service are refused. A work made before this is given/kegat its next round. The query service declares its README. - A check runs against the services its app is bound to.
checks: [{ name: e2e, run: "npm test", db: true, services: [query] }]gives the check its own instance of each service named that the app's events are bound to: the image it was installed with, pinned, with the same walls and caps, an empty volume of its own, a value made up for each secret, no port on the node and no internet even where the service was allowed it, at its own walled address. The node answers its socket with the check database's own events, read as the relay reads an app's (in order, asapp.<app>.<type>fromcheck), and its app binding with a token made for this check; nothing reaches the node's log, and it writes no events. The check's command is givenKEG_SERVICE_<NAME>_TOKEN,KEG_SERVICE_<NAME>_URLandKEG_APP, and its code may call the service from the server side there: there is no browser, no real data, and the token reads that instance alone (in an environment only the app's page asks the service). A check names at most four, and needs a runtime agent that says when a command's output was cut: with one from before, the verdict iserror, naming the restart; its instances are made under its turn at a Postgres of its own, so at most two checks have either at once and a third waits in order; one whose image is not here is the verdicterror, one that stops or is not ready in 60 s fails the check with its last line; each is removed when the check ends and what a stopped node left is removed as it starts. As with a check's Postgres, work machines and containers that share the node's network can reach an instance's address; its token, given to that check alone, keeps them out. The evidence says "against its own instance of query".@keg/app/node'shostAllowedanswers the address the node gives an instance (KEG_ADDRESS).docs/WRITE-A-SERVICE.mdsays what a service must do to be run so: start with empty state and secrets it has never seen. - The gate says, for each round, what the agent was handed and what its checks ran against:
keg work showand the console's work page list "round 2: handed with/notes (1 file, 27 B); Keg's guide and @keg/app client; the instructions of query; checks ran e2e against query", read only from what the node and Keg's checks wrote down. - Where a work may be handed files from: its own project's folder, and folders a person makes available with
keg work allow-from <folder>(listed bykeg work allow-from, taken back with--remove; never a whole disk,/home, a home itself, the node's own folder or the system's), and those the node gives agents. Nothing else, a home included. Within those, every folder of the path is held to the names of where credentials are kept (.ssh,.gnupg,.aws,.kube,.docker,.config/gcloud, keychains,.env*, keys and the rest), as a second layer. - What would be handed is shown before it is. The console's New work and attach dialogs, and
keg work new --withandkeg work attachon a terminal, first show the path the node will really copy (with links above it resolved), how many files, how large, and what is left out, and ask, No first (--yesskips it).POST /v1/work-attach-inspectgives it and keeps nothing. It keeps a person from being fooled by a path as written. It does not stop a page holding the console's token, which is the person by Keg's model, as any of the console's calls are. keg app clientbrings an app's vendored@keg/app(vendor/keg-app, or the folder itspackage.jsonnames) up to the node's, as a change to commit, and says what it added or changed; in a piece of work,sh /keg/app-client/vendor.shdoes the same.keg app show, run in the app's folder, says when its vendored client is older than the node's.GET /v1/app-clientgives the node's client.- The Mac app catches up with the console. Keg services: "Install from a Folder…" asks each item in the node's words, with nothing ticked beyond what was allowed before and never a port of this computer or the internet, and says the version, the folder, the manifest digest and image being approved, the page's port, the secrets it reads and what a replace removes, first and with Cancel as the default; a build can be called off; each row says where a service is from, what it is pinned to, why it failed, what it was allowed and still asks for in the node's words (with Allow… and Stop Asking), the apps yet to be given its token, and the ports this Mac does not reach; a secret is set in a secure field and not kept once sent; Remove says that its secrets and timers go, with "Remove its data too" off unless ticked; the setting for building services from their folders is on the page, never turned on but by a person, and a folder refused while it is off is answered plainly. Events: deliveries backing off with Skip, failed ones with Retry, the timers set (at most 50, and how many more), and what finished deliveries said, as text. Apps: jobs being retried with their last error, names no worker takes, indexes still being built, a person's Retry Failed, and what an app is given only when next deployed. Work: a check that could not be run is shown as failed with its reason, and each check's tests against the round before, as printed. The containers list and a container's overview say which of its ports this Mac does not reach, and where it reaches them on another number; the first page says which ports on this Mac lead to the node, as
keg vm statusdoes. Removing anything starts on Cancel. - A query service, from outside.
extensions/querykeeps each event it is told of (work, change sets, and SupportDesk's tickets and ratings where that app is) in DuckDB on its volume, and answers SQL that only reads on this computer's port 8224: aPOSTto/queryof{"sql": ...}with the headerX-Keg-Query: 1answers JSON, and its page shows a table. All it holds is read with a key a person sets (keg system secret query QUERY_KEY, at least 32 characters). DuckDB is opened locked, so a query reaches no file, network or extension, calls only a short list of table functions, and runs in a transaction that is rolled back. An answer is held to 10,000 rows, 100 columns, 8 MiB, and each value that is not a number or a time to 4 KiB of its text (a nested value as DuckDB writes it, not JSON); a query is answered from a copy of what it reads, made at most every 2 seconds, and says as of when (as_of), in a reader, a process of its own that is killed when its query runs on past its 10 seconds, whatever it calls, so that nothing else is lost and the events go on being kept; four queries run at once, one for each organization of each app, and a token for one organization asks at most 20 a minute (429 withRetry-Afterpast either). An event to be kept while the databases' process is started again waits for it, within its delivery's hold, so no try is counted for that. It has 1024 MB, and the README says what of it each process takes and how much of its volume the copies may. It keeps 30 days and 384 MiB of events, the oldest going first, held in batches within DuckDB's memory; past its size and unable to prune, it keeps nothing more of that part and says why. - A NATS service, from outside.
extensions/natsruns a NATS server with JetStream on port 4222 and puts each event it is told of (work, change sets, and SupportDesk's tickets where that app is) in the streamKEGaskeg.<type>. Readers connect asreaderwith a password a person sets (keg system secret nats READER_PASSWORD); until one is set, no reader is let in. The password is an operator's: it reads every organization's events of a bound app. Readers are in an account of their own, with a stream of their own, held to 32 consumers, 64 connections and small messages, and cannot publish, purge or reach the service's stream. Its page, on port 8222, lists the last it published, and says when the readers' stream had to be made again, empty. - Install a service from a folder in the console. "Install from a folder…" on the Keg services page asks each item in the node's words, with nothing ticked that reaches past the service's socket, and builds it, with a way to call the build off. A service's secret is set there in a password field, sent to the node and never shown again; "Stop asking" (and
keg system decline <name>) stops offering what a person left out, until the service is installed again with different asks. - Timers and results on Events. The console's Events page shows the timers services set and what each finished delivery returned;
GET /v1/deliveriesgives each finished delivery'sresult. - An app's binding says which pages are the app's.
GET /v1/bind/<name>of an app's events givesorigins, the exact origins (scheme, name and port) of the pages the node serves for that app's services. A service trusts a page as the app's only by these. - A token for an app, and tokens for one organization. A bind to an app's events with
token = truein the manifest has the node make a token for that service and app, given to the service with its binding and to the app's servers asKEG_SERVICE_<NAME>_TOKEN, withKEG_SERVICE_<NAME>_URL(the address a browser opens the service on) andKEG_APP, when the app is next deployed;keg system ls, the console and the install and removal answers say which apps are yet to be given it. The token reads every organization's content the service holds, so it never goes to a browser: the app's server makes a token for one organization, for at most 15 minutes (v1.<payload>.<mac>,docs/PROTOCOL.md), and hands that to its page. It is a bearer token: whoever holds it can use it until it expires, from anywhere, as it is bound to no origin. The query service keeps each organization's events in a database of its own (at most 64 per app, given by recent use: one that wrote nothing for 7 days gives its place up, and one given a place is filled from the app's own database) and answers such a token from it alone, and of them only those for every member: an event the app sent to some users or roles only is read with the app's own token, never through a page, in this version (each relayed app event carriesaudienceandaboutfrom its row, which NATS passes on as they are; an organization given a place is filled with only such events too); it takes the app's own token only from a request no browser made. A bind with notokengives the app nothing: NATS's asks for none. A service keeps organizations apart by a relayed app event'sorganization, which, as in 0.10.0, is what the node read from the event's row (keg.events.organization_id, which the app's capability layer sets from the actor), never what the app wrote in its payload. @keg/appfor services and their apps.@keg/app/nodegainshostAllowed(host), the check ofHostboth services use; the new@keg/app/servicegives an app's serversserviceFor(name)(its token and address) andserviceToken(name, { org, ttl })(a token for one organization).docs/WRITE-A-SERVICE.md, how to write a service from outside, with a checklist, anddocs/PROTOCOL.mdgains bindings, a service's own events, timers, an app's events and pages.- Who is sent an app's events, said one way only.
keg.expose_events_to(types => ..., roles => ...)sends them only to those roles, andkeg.hide_events_from(types => ..., roles => ...)to every member but those;keg.expose_events(types, roles), which took the roles not sent them and was read the other way round, still works.keg.off(type, job)takes back akeg.on, and says so if there was none. - An app reads its own events, each member only those meant for them.
keg.emit(type, payload, audience)records who an event is for:'{"organization": true}','{"roles": [...]}'(at most 20, each a plain word) or'{"users": [...]}'(at most 100, each a member of the organization). It fails closed: a null audience, orto: undefinedornullin@keg/app, is refused, never read as the whole organization; that is said only by leaving the audience out or naming the organization. The viewkeg.my_events(id, type, payload, at, actor, about) gives the member acting their organization's events of an audience they are in, behind a security barrier, read newest first by an index and a page at a time by(at, id). Organization and audience decide who may read an event;keg.expose_events*decide only what the realtime gateway pushes, so what is pushed is always among what may be read, andkeg.visible_eventsnow honours the audience too. A job, as the organization'ssystemactor, reads what is for the whole organization and what namessystemamong its roles, never what is for users.keg.emit(type, payload, audience, about)says what an event is about (ticket/42, at most 200 bytes, refused if longer), in a column of its own and never from the payload, so a longpayload.subjectis only a payload; an index makes "events about this, newest first" cheap, and adding the column writes no row again.@keg/apphasdb.emit(type, payload, { to: { roles } | { users }, about })anddb.events({ type, about, limit, before }), which reads each page, the first or one far back, from the index whatever Postgres's statistics say (with sorting turned off for that statement alone), and the node has Postgres look atkeg.eventsagain once it has built one of its indexes, so the columns 008 adds have statistics. The relay to services from outside is not held to an audience. keg app jobslists an app's jobs that wait, run or failed, with their attempts, when each runs next and its last error, made safe to print (--env,--failed,--json);keg app jobs retry APP IDandkeg app jobs retry APP --failedput failed jobs back to waiting with their attempts reset.keg app showand the console's Apps page say how many are being retried and the last error, and name a job that no worker has taken for five minutes ("is its handler registered?"); the console has a Retry button. Likekeg app show, these are a person's: an agent is refused them.- A check may ask for a database of its own. In an app's
keg.yaml,checks: [{ name: e2e, run: "npm ci && npm test", db: true }]runs the check against a Postgres of its own: a container started for it from the image the node's shared Postgres runs (pinned, so nothing is fetched; a node that has never run Postgres fetches it by a digest written in Keg, never by its name), with 256 MiB of memory, 1 GiB to write and its newest 10 MiB of output kept, walled so that it makes no connection of its own, at its own address, with no port published. Containers on the node's bridges cannot reach it. Work machines and other containers that share the node's network can reach its address over TCP: only its password, 192 random bits given to that check's command alone, keeps them out. Without it, a hostile piece of work can at worst use up that server's connections or memory and so make another work's check fail, never pass; the node's shared Postgres is open to them in the same way. Not built yet: a unix socket in the work's own mount instead of TCP, or work machines on a bridge of their own with one opening for each check. In it are the app's capabilities and the work's own migrations, at the commit checked, and the check is givenDATABASE_URL(withKEG_ENV=check,KEG_SERVICEandPORT; no secrets, no data and no realtime of any environment). It is ready in about a second, and says so in the check's output. A migration that fails fails the check, with Postgres's words. The container is removed when the check ends, and what a node that stopped meanwhile left is removed when it starts. At most two run at once; a third waits up to ten minutes, and is then given back to be run again, never failed for waiting; those that wait have their turns in the order they came. One that runs out of memory or is not ready in 90 s is started again, three times in all. A node that cannot run one at all (no loop devices, an agent from before, which kegd asks to be restarted, or an image it cannot fetch or that is not the one pinned), or one that did not start three times, gives the check the new verdicterror, with why, which holds the work at the gate rather than trying again. The evidence says "with a database of its own". - A tenant table says what each command allows.
keg.tenant_table('app.ratings', update => false, delete => false)(andinsert => false) turns those commands off for every role the app connects as, its jobs among them: an UPDATE or DELETE touches no row, an INSERT is refused. Called again it keeps what it is not told: a command turned off stays off until a later call turns it back on by name (update => true). Called with the table alone the first time it is as before: every member of the organization may read and write every row unless a restrictive policy says otherwise. The guide andkeg app new's migration say so, and that a restrictive policyFOR ALLcoversSELECTtoo. - The gate shows how many tests each check ran, against the round before. The checks service reads the counts that node --test, cargo test, pytest, jest, vitest and go test -v print, as well as JUnit and TAP, into its record ("e2e: 41 passed, 0 failed"); what it reads never decides whether a check passed, and a number past ten million, or a sum past it, is no count: it is shown as unknown, and nothing a check prints can make the checks or
kegoverflow. The count is kept with the record as numbers (testsin its evidence), never read back out of a summary a check's name could fake, and is shown "as printed".keg work showand the console's work page say "e2e: 41 tests (was 41)", as numbers only, so that tests asked for in a note and not added show at a glance. - Cleaning up, and what building keeps.
keg cleanupshows what is on the node's disk by kind, with sizes (layers images share counted once), and item by item what a cleanup would remove and why each thing is kept or not;keg cleanup --applyremoves it and says what it freed. What is always safe goes: the images of builds older than the newest 5 of each service, checks' containers that have ended, and layers and blobs nothing refers to. Only when asked:--works(the machines and folders of finished pieces of work whose days are up),--images(images nothing uses, pulled or built by a person),--containers(containers a person ran that have ended),--build-cache, and--volumes NAME…, each volume by its name.keg rmi --damaged FILEremoves an image record that cannot be read, askeg cleanupnames it.--dry-runis what it does without--apply;--jsongives it whole. Nothing that runs, that a change waiting for approval would deploy, that a rollback goes back to, that a piece of work at its gate asked about, that a machine or a service from outside is of, or that is the shared database's image is ever removed. Only a person may: an agent is refused all of it, and a service with it.keg system keep builds Nandkeg system keep work-days N(0: as soon as it is finished) say how much is kept, andkeg system keep works ask|autowhether Keg asks before clearing finished work (ask, the default) or the node clears it by itself. The console and the Mac app have a Storage page, with the disk by kind, these settings, and Clean up, which shows exactly what goes and what it frees before anything does. - The node cleans up after itself. After each build and once a day it removes what is always safe to remove, from a day after it first looks: until then it only says what it would remove (
keg cleanupshows when it begins). Keg asks before clearing finished work: a finished piece of work (merged, or turned down at its gate) is shown as one that can be cleared 7 days after the node saw it finish, and its machines and folder go only when a person ticks it (or turnskeg system keep works autoon). Its branch, evidence, notes and what it changed stay, and once it is cleared it cannot be taken up again. Its folder is removed only where it was made, never through a link, and not while any container has it. A layer made in the last hour is never taken, so nothing a pull, a build or an image sent from another node is still using goes. On a Mac the node then tells its disk which blocks are free, at most once a day, so the space comes back to the Mac; elsewhere only withkeg cleanup --apply --trim. - A disk nearly full is said. From 85% full the console's first page,
keg system lsandkeg vm statussay so and how to free space; at 95% a build or akeg pullis refused before it writes anything, with how to free space, rather than failing part way.keg vm statusshows how much the disk image takes on the Mac beside what the node uses of it. - A cleanup knows what works were handed and what their checks ran against. Storage counts the files handed to pieces of work as a kind of its own ("Files handed to works"); they go when their work is cleared, once nothing has them, and never before, and a finished work's item counts them. A check's own instance of a service and its volume are kept while the check has them; one that has ended and that its check no longer has goes with the checks' throwaway containers.
Changed
- The Mac's Linux machine is smaller and starts sooner. Its image is made of only what the machine runs, from a root of its own (
RUNTIME_PACKAGESinScripts/build-vm.sh, which says who needs each), where it was the whole container Keg is built in, with its C compiler, binutils, make, Perl and rsync: 17 MB to download where it was 62, and 50 MB in the VM's memory where it was 189. On an Apple M4, six boots of each: the API answers 0.8 s afterkeg vm start(median; 1.4 s before), and the VM uses about 160 MB where it used about 300. It ships 36 Alpine packages where it shipped 71, and 13 sources under the GPL or LGPL where it shipped 29 (3 of them under version 3, where it was 11: no cpio, make, rsync, gmp, mpfr, mpc, libidn2 or libunistring); the GPL source a release carries for them is 43 MiB where it was 225. A throwaway node ran on it every path that runs a program of the image: a published port, a container as another user,keg build, Compose with a named volume, Keg's own services, a service from outside built behind walls on spaces of a fixed size (extensions/query), shared folders, an app on the shared Postgres, a piece of work's machines, Rosetta, the SSH agent, Docker's API, and a stop and start with its data kept. The release checks the image holds no compiler or build tool and stays under 20 MiB packed, 56 MiB unpacked. - On an agent's credential,
keg machine shell NAME -- <command>andkeg sandboxwork. They opened a session, which an agent may not; they now run the command to its end through the calls an agent has (askeg_machine_runandkeg_sandboxdo), with its output and exit status. An agent's machine shell runs one command at a time; its sandbox has nothing of the computer in it.keg machine createon an agent's credential asks the Mac to share nothing, askeg_machine_createdoes: the folder must be one the node gives to agents. - Faster where the node is asked most (
docs/PERFORMANCE.mdhas every number, how they were measured, and how to measure again withScripts/bench.sh). On a Linux node with 200 containers:keg pstakes 3.8-10.4 ms where it took 14.7,GET /v1/containers2.1-3.7 ms where it took 12.9 (846 a second from 8 clients, where it was 296), Docker'scontainers/json6.9 ms where it took 15.3, and a refresh of the Mac app costs the node 12-20 ms of processor where it cost 66 (the console's, 10-14 where it was 45). kegd keeps its connections to the runtime agent, so a question of it takes 9-19 µs where it took 70-120. Claiming a delivery with 2-3 thousand waiting and 9 thousand done takes 0.30 ms where it took 26.4, and finding when the next is due 0.13 ms where it took 18.2. The Mac's forwarder asks the node for its ports once and is answered when they change, where it asked ten times a second: about 20 ms of the node's processor each 30 seconds where it was 230-310.keg logs -f c | headends onceheadhas its lines. - A walled container is reached by the node from an address of its own on the walled bridge, the last of the walled range (
10.89.255.254unless the range moved), which is never handed to a container. A walled container's own rules let its published and reached ports in from that address alone, so they keep containers on the node's bridge out even while the node's own rules are being made again, and they are made before its link is up. A service from outside sees the node's connections come from that address. - The console refuses a request another site's page sends, by its
Origin, whatever it carries; a request with noOrigin, ascurlandkegmake, is answered as before. - The Keg License. Keg is closed source and free to use under the Keg License (
LICENSE.md,keg license), which comes with the app, thekegcommand, the disk image and each release;keg license --third-partylists the software by others in Keg. It was in 0.10.0's files and is said here. - A new container may no longer be named
machine-work-…, throughkeg run --nameor the Docker API: those are the names of the machines Keg makes for pieces of work. A container that already has such a name is left as it is. - A relayed app event carries the organization the node read from its row (
organization, fromkeg.events.organization_id, which the app's capability layer sets from the actor), never what the app wrote in its payload, so a service may keep each organization's events apart by it. - The Mac app no longer asks the node for everything every 2 seconds. It holds the node's log of events open, as the console does, and asks again only for what an event concerns, and only where it is seen: the section shown and the sidebar's counts, or with no window only what the menu bar's item shows. Charts are read every 2 seconds only while they are in front; everything seen is asked again every 30 seconds only while the window is in front; a node that does not answer is asked a second later, then twice as long each time up to half a minute. While the node is at rest the log is not held open, since a held request counts as work and its VM sleeps only with no connection open: it is looked at every 15 seconds and let go at once, and while the VM sleeps nothing is asked at all. Storage's report, which the node walks its disk to make, is asked for only while Storage is shown: when it opens (at most once a minute), after a cleanup or a change to what is kept, and when the log says something that held space went, at most every 15 seconds.
- An app's events reach a service in the order they were read, for each app and environment: a later one is not claimed while an earlier one waits, runs or backs off, and one failed for good holds nothing back. A service is still told of an event again after a hold runs out, so it is still safe to be told of each twice.
- What a service held is waiting again at once when a person ends its run (stopped, removed, installed again) or the node starts again, its try not counted, and a claim that was waiting as it stopped is given nothing. Before, each waited out its hold of 60 seconds, and an app's next event could go ahead of it. When its run ends by itself (it exits or crashes) holding a delivery, the try counts, so an event it dies on every time fails after its fifth try and the app's next events go on.
keg events skip <delivery>(and "Skip" on the console's Events page) lets a person fail a waiting one sooner. How far behind a subscriber may be on an app's events is counted for each environment, solocalcannot starveprod. - A name in
localthat is an app's service is that service's, and never a person's container of the same name: while the service has no port, the name leads nowhere. - The install question says what is true of a service bound to an app's events: that it holds every organization's content of what it hears, who may read it, what a token for the app is for and when it is given, and that a published port is reached by any program on this computer.
Fixed
- Two nodes on one Mac no longer hand out each other's addresses. Each node's VM serves names on 7380 and 7443, and the Mac's forwarder only logged when one was taken there, so the second node's
KEG_REALTIME_URL, its apps' origins, its console link and its "Try it" and "Open" links led to the first node, with what they carried (a signed-in user's session token, the console's link). Now a port of Keg's own that another program holds on the Mac is opened on the next free one (kept in~/.keg/runtime/mac-ports.json, so links stay the same), the forwarder tells the node what leads to it (PUT /v1/reach, a person's alone), and the node hands out only that, and nothing before it is told.keg vm statussays which ports the node got and why. A port asked for by number is never moved:keg ps,keg portsand the console say when the Mac does not reach it. An app keeps an address it was given until it is next deployed, whichkeg app showand the console say. See "Where a node is reached" indocs/PROTOCOL.md. - The Mac app no longer ticks, for a person installing a service from outside again, what reaches past its socket (a port of this computer, the internet), as the command line and the console do not. It did in 0.10.0.
- Each environment of a service keeps its own way in. A release approved into
stagingno longer takeslocalhost:3000from the same service inlocal, after which every deploy tolocalfailed until staging was stopped by hand. The first environment of a service to be deployed has the port itskeg.yamlnames; another environment of the same service is given the next free port, keeps it, and is reached by its name (web.staging.keg.localhost) as before.keg servicesshows each one's port, and on a node where another environment already holds the portlocalnames, says which and the commands that givelocalits port back (an upgrade does not move it). Another service that names a port already held is still refused. GET /v1/apps/<app>no longer fails while the app is first deployed. The app is bound before its database, roles and grants are made; a reader meanwhile (the console asks every few seconds) was answered 500, and could make the app's password itself, beside the deploy. An environment whose database is not made yet is shown without jobs, and nothing is made by reading. Also:keg pssays how many app containers it left out and thatkeg ps --appsshows them;keg servicessays what runs in the other environments;keg eventssays its times are UTC; the build agent is told to install the project's dependencies and run its checks before it commits, and never to commit with a test it knows fails.
Upgrading from 0.10.0
- Restart the runtime agent on a Linux node. The agent that runs containers now speaks protocol 4, where 0.10.0's spoke 2. A node upgraded without restarting it goes on with the old one: containers keep running and most things work, but a cleanup, a check with a database, a check with services, and reaching a walled container are refused, each with a message that names the restart.
sudo systemctl kill kegdrestarts it (systemd starts kegd again, with a new agent): every running container stops; Keg's services and machines start again, other containers do not. On a Mac, Stop Keg and then Start Keg in the app (orkeg vm stopandkeg vm start); that too stops every running container. - The node removes nothing by itself for a day after its first start on this version, and only says what it would remove; then, after each build and once a day, it removes the images of each service's builds beyond the newest 5 that nothing needs, and what is otherwise always safe to remove. To keep more builds, say so before then:
keg system keep builds 20.keg cleanupshows what would go and the day it begins. Releases stay in the record; a release whose image has gone can no longer be promoted or deployed again, but what runs and what a rollback goes back to are always kept. - Clearing finished work is off. The node never clears a finished piece of work by itself unless a person turns it on (
keg system keep works auto); until then it lists it as work that can be cleared, and a person ticks it. - A work's machine that was running across the upgrade has no record of the container Keg made for it until it is started again: Keg now finds a work's machines by that id, never by a name. Until then, clearing that work leaves its folder and says why ("Keg has no record of the container it made for …"); stopping and starting the machine, or the node, records it.
- Turn the assistant on, if wanted. Nothing of it runs after an upgrade:
keg assistant setup --env-file <path to a .env>readsOPENAI_API_KEYonce, seals it for the model gateway, and installs and starts the gateway and the assistant. Its spend is held to $5 a day for the assistant and $20 for the node unless changed withkeg assistant limits. What it reads is sent to OpenAI, log lines among it; anyone with the console's link can read its conversations and confirm the changes it proposes, so treat that link as the node's key. - The node's own store gains, as it starts: new columns of deliveries, evidence, finished work and backing services (a backing service from before is a person's); the tables
confirmations,runs,run_steps,conversations,secret_marksand the model ledger's; and the table of bindings is made again, in one step, to take the kindsmodel,toolsandruns. An app that uses events or jobs is given capability files 007 to 009 at its next deploy, or sooner, when the relay next reads its events (008 adds two columns tokeg.eventswithout writing a row again; the node builds its two indexes afterwards, concurrently, andkeg app showsays while it does). - Where a Mac's port of Keg's own (7380, 7443 and the rest) is held by another program, the node is now reached on the next free one, kept in
~/.keg/runtime/mac-ports.json; an app keeps an address it was given until it is next deployed. - A service from outside installed before this version (query, NATS) is to be installed again from this version's folder (
keg system install <folder> --replace, or Install from a folder… in the console). Until it is, a check that names it inservices:fails, the instance answering the check "only names of this computer are answered" (its own copy of@keg/app/nodedoes not know the address a check gives it,KEG_ADDRESS), and works are handed none of its instructions (docsin its manifest is read as it is installed). Installing it from another folder removes its volume and secrets, and with them what it held: the query service then holds only the events of after it (the relay sends a newly bound service none from before, so a Reports page built on it starts again from nothing). Set its secret again, and deploy each app bound to it again so that it is given its new token. (Said after the release: the notes as released left it out.)
Going back to 0.10.0
- Not supported once the assistant or the model gateway has been set up. 0.10.0 does not know Keg's services
modelsandassistant, nor bindings of the kindsmodel,toolsandruns, which it answers as bindings that are not there. - Otherwise: 0.10.0 leaves the new tables and columns of the node's store as they are, and does not read them: conversations, runs, proposals and the model ledger stay, unread, until this version is installed again. An app's database keeps what capability files 007 to 009 made (who each event is for, what it is about,
keg.my_events, the indexes), which 0.10.0 leaves as they are. The steps for 0.9.0 below (services from outside,remove-walls.sh) apply only when going further back.
[0.10.0] — 2026-11-22
Added
- Work and gates.
keg work newbegins a piece of work in a project, on a branch and in a worktree of its own; agents take it through build, test and ship in a machine of their own, and each stage keeps what it found as evidence. A gate waits for a person:keg needslists what waits,keg gate approve|rejectanswers, andkeg work send-backsends it back with what is to be changed. Nothing is merged until a person approves. An agent sees none of this and answers no gate. - A log of events. Every change the node makes (work, stages, gates, evidence, change sets, services, apps, containers) is written as an event in the same transaction as the change.
keg eventsreads it;keg events failed,keg events retryandkeg events timersshow what Keg's services have yet to do. The console and the Mac app have an Events page, and refresh when something happens. - App capabilities. A
keg.yamlwithapp:anduses: [data, identity, events, jobs, realtime]gives an app a database of its own in each environment, in which tenancy is the database's to keep: sign-in, sessions, organizations and members; events and jobs, at least once; and a realtime gateway that sends each subscriber what its user may read.keg devruns one,keg app ls|show|new|stop|orglooks after them, and@keg/appis the library. - Keg services. Keg runs services of its own on the node, each in a container with a socket and grants of its own: the console, the checks that the test stage asks for, and the realtime gateway.
keg system ls,install,start,stopandrmlook after them. - Services from outside. A folder with a
keg.service.tomlis installed withkeg system install <folder>: a person is asked about each thing it asks for, in plain words, and it holds only what was allowed. It runs pinned by digest, behind walls: no capability, no network but its socket (or the public internet only, if that was asked and allowed), memory, processes and disk capped, a volume, secrets and ports only through bindings of its own, at most 16 connections and 8 requests at once. It can be told of events, write its own, set timers and hear an app's events. Building one from its folder on the node is off until a person turns it on withkeg system builds on; off, a service names its image by digest (image = "…@sha256:…"). A node needs loop devices andmkfs.ext4(e2fsprogs) to run them; one without says so and refuses them alone.docs/PROTOCOL.mdis what such a service may rely on. - The console has two modes, Containers and Builder, with a guide through both in ten steps;
keg example hello-kegmakes a small project to try them with. - The Mac app has the same two modes and guide, and new sections: Needs you (pinned, with its count), Work with Approve, Send back and Reject at a gate, Keg services with the question of what each asks, Apps, and Events.
- The source of the GPL and LGPL software in Keg, the kernel and the Alpine packages of the Linux machine, is published with each release, as
keg-<version>-gpl-source-kernel.tar.xzandkeg-<version>-gpl-source-packages.tar(Scripts/gpl-source.shmakes them from the image built).
Changed
- What a request names as a number (a CPU limit, a timeout, a duration, a recipe's minutes) is refused or held at its most when it is too large to hold, never a panic; a release build checks every sum for overflow.
- A panic while the control database is held fails that request alone: the node goes on.
- An app's own transactions left idle are ended. The roles an app connects to its database as have
idle_in_transaction_session_timeoutset to 10 minutes: a connection left idle inside a transaction for that long is ended by Postgres, and its transaction rolled back. One left open would hold back that app's events. - A Dockerfile or
.dockerignorelarger than 1 MiB is refused, before more of it is read, by every build: a service's, and a person's ownkeg build,keg upanddocker buildalike. - What a request sends is held to a size. A request to the Keg API, the console or the Docker API whose body is JSON is read to 1 MiB (evidence, whose body is kept to 1 MiB and cut past that, to 8 MiB). A blob or a volume's contents sent to the node is written to disk as it arrives, up to 64 GiB; a build context or an archive sent into a container through the Docker API, up to 16 GiB. A request past its limit, whether it says so or turns out so, is answered 413 with a sentence that says the limit, and its connection is closed as soon as that answer is sent, so nothing more it sent is read, as a body or as a request.
Fixed
- One request could make kegd, or
keg uiandkeg files mount, end: the HTTP library they use read what was left of a body it did not need into one buffer as large as the request said it was. It is kept in the repository now (crates/vendor/tiny_http), changed so that it reads what is left a few KiB at a time, and closes the connection instead when more than 1 MiB is left. - An app's events waited, and the relay that reads them dropped its connection and tried again, whenever two transactions that write were open at once past the last one to end.
- A container whose image names a user other than root could hang as its first process changed to that user, on a busy node, and then could not be stopped: it held the container's lock for ever. It now changes user by system calls of its own, and one that does not reach its command in 30 seconds is ended. This is in the agent that runs containers, and takes effect when the agent is started again (see below).
Upgrading from 0.9.0
- The agent that runs containers stays the old one after an upgrade on a Linux node. The new kegd runs once kegd is restarted:
Scripts/install-linux.shdoes that, and afterkeg updateit issudo systemctl restart kegd. The containers keep running in the old agent. Until it is started again,keg psandkeg vm statussay so, and services from outside, kept volumes and walled containers are refused.sudo systemctl kill kegdstarts it again (systemd starts kegd, with a new agent): every running container stops; Keg's services and machines start again, other containers do not. On a Mac, the app updates itself, but the Linux machine goes on running 0.9.0 until it is stopped: Stop Keg and then Start Keg in the app (orkeg vm stopandkeg vm start) runs 0.10.0 and its new agent. That stops every running container. - Walled containers (a service from outside, and its build) are on a bridge of their own,
kegw0, and the node keeps them from itself with rules that match only what comes in on that bridge. Nothing of it is made until the first walled container. Their range is 10.89.0.0/16, unless an address or route of the node's own overlaps it (a Podman network, say): then the first free of 10.90, 10.91 and 10.92.0.0/16, kept from then on in the agent's folder (walled-range). A node whose networks cover all four runs everything but walled containers. - Building a service from its folder is off on every node, upgraded or new:
keg system builds onturns it on where a person develops services. - After an upgrade,
keg system lssays the realtime service "asks for listens:app.bound too: keg system install realtime": it goes on running as before without it,keg system install realtimegives it (so that it is told when an app is bound), and it is safe to leave.
Going back to 0.9.0
- First remove each service from outside with
keg system rm <name> --data: its container, its volume, its filesystems and what its install brought to the image store go with it. 0.9.0 does not know them, and would leave them. - Then, with kegd stopped,
sudo sh remove-walls.shtakes away the walled bridgekegw0, its rules (IPv4, IPv6 and nft), the walled range's way out and the note of which range was chosen. The script is a file of the release, andScripts/remove-walls.shin the source. If kegd's--rootis not/var/lib/keg, give that folder to the script:sudo sh remove-walls.sh /srv/keg. - An app's database keeps the tables and functions its capabilities made (the
keg,keg_cryptoandkeg_horizonschemas); 0.9.0 reads none of them, and they do no harm. The node's own database keeps the new tables beside the old, which 0.9.0 leaves alone.
[0.9.0] — 2026-11-20
Keg is rewritten. The app that wrapped Apple's container tool is gone, and with it what was unreleased in it (managed agents, traces, Cooper, the app catalogue). In its place:
Added
- A runtime of Keg's own, in Rust. It pulls, builds and runs OCI images itself, on Linux directly and on a Mac in a small Linux machine that boots in about a second and sleeps when idle. There is no Docker and no Apple
containertool underneath. - The
kegcommand: containers, images, volumes, Compose files, machines (a Linux system to work in), a sandbox for trying code,keg initfor setting a project up,keg k8s(one node of k3s),keg migratefrom Docker Desktop, OrbStack or Colima,keg files mount,keg update. - Docker's API, on a socket of its own:
docker,docker compose,docker buildwith BuildKit on,docker cp,docker push, restart policies, UDP ports. - Services that move. A
keg.yaml, environments, releases and change sets with checks and approval, promotion of the exact image between nodes over mutual TLS, rollback, deploys with no gap, a shared Postgres, secrets. - Names and HTTPS.
NAME.keg.localhostfor anything with a port; sharing through a server you run, with a Let's Encrypt certificate for each name. - For agents.
keg agents,keg mcp, andkeg agents --connect claude|codex|pi; an agent's rights are held by the daemon. - A new Mac app, in SwiftUI: changes to approve, services with rollback, containers with output, files, usage and a terminal, machines, images with a vulnerability check and a search of Docker Hub, volumes, environments and nodes, a menu bar item, settings for the Linux machine. It has the
kegcommand and the Linux machine inside it, links the command onto the PATH, and follows the Mac's language, in fifteen. - The app, section by section. An overview; containers that are filtered, searched, sorted, started again, restarted and removed several at a time, each with live charts, how it was made, output with a search and a level filter, files saved to Downloads and a command run in it; images with sizes, how each was built and the progress of a download; volumes made from the app; Kubernetes with its pods and services; sharing; a menu bar that lists what is running; a notification when a change starts to wait for approval; settings that point
dockerat Keg and import from another engine; andkeg://links. - The web console, rebuilt to the same breadth, with a command palette, keyboard shortcuts and a layout for any width.
keg start,keg restart,keg pauseandkeg resume;keg imagessays each image's size.- Compose projects, builds and networks in the app and the console: a project is started and stopped as one and its file changed and run again; each build is kept with what it said; networks are listed and removed.
- A terminal in the app's window, in a container's pane; a container's ports and variables changed from there; light or dark; a report to copy when something is wrong.
- Twenty-three more languages in the app: thirty-eight in all.
keg env rmforgets an environment that has nothing in it, as do the app and the console. Its change sets stay on record.- One service of a Compose project is started again and restarted by itself, and is still that service of the project.
- A build that fails is kept with the steps it got through.
- Disk and network, charted for each container beside processor and memory, and its own address told, in the app and the console.
- Go to… (⌘K) in the app: type part of a section's, container's, service's or image's name and go there.
- The app's language, accent colour, lettering and text size chosen in its settings, where they are not to be the Mac's. The size is followed by the sidebar, the lists, output and the terminal; small labels keep theirs.
- In the app: back and forward between sections (⌘[ and ⌘]), start, stop, restart and remove on each container's row, and each image marked by its letter and colour.
- A running container's ports are changed without stopping it, from the app and the console, where ports are all that change and it already has one open: it is the same container, with everything it has written.
- A proxy for fetching images:
keg vm start --proxy http://HOST:PORT, or the app's Linux Machine settings. One that listens on the Mac itself is reached from the Linux machine too. On a Linux node,KEG_PROXYorHTTPS_PROXYin kegd's environment does the same. A password in the address is kept from containers and from other programs on the Mac. - The console, laid out as the Mac app is: the same sidebar and sections, a toolbar with back and forward, the container list with the chosen container's charts, output, files and terminal below it, and Kubernetes pods and services.
- The console as a service of the node.
keg uinow has Keg run its own console in a container (keg-console), made from the keg command itself with nothing fetched, and opens it atconsole.keg.localhostwith a link that is the person's alone. It stays up untilkeg ui --stop.keg ui --localserves it from the command as before, as does a node that cannot run it.
Changed
- Requires macOS 15 or later on Apple silicon (0.8 required macOS 26).
- The app updates itself as before, through the same feed; an installed 0.8 is offered 0.9. Containers, images and settings of 0.8 are not carried over: they belonged to Apple's
containertool, which 0.9 does not use.
Fixed
- A node with a public name did not answer at that name itself, only at the names under it, so whatever else held the port answered with a certificate of its own and browsers warned. The node now has a certificate for its own name and says there what it is.
- A certificate that could not be got for a share was not asked for again for six hours. It is now asked for after two minutes, then ten, then thirty.
- Asked plainly over HTTP, a node sent the visitor on to HTTPS at whatever host the request named. It now does so only for its own names.
- Two kegd on one machine that started their first containers at the same moment could both try to make the bridge, and one container failed with "File exists".
keg pausereturned before the kernel had stopped every process of the container.- The tests that run containers never ran on GitHub: under sudo they could not find Rust. They run there now.
- On a Mac, a build run within a second of a file being replaced (as an editor saves one) failed with "No such file or directory": the folder shared with the Linux machine went on naming the file that had been there. The build now waits that out.
- After Keg was restarted, sharing the same thing again through a node was refused: the node still held the name for the daemon that had gone. A share whose node has gone now gives its name up at once.
Removed
- The 0.8 app and everything particular to it: Cooper, managed agents and traces, the app catalogue, Dev Containers, the health score, the embedded terminal, the
keg://links and its own command-line client.
[0.8.4] — 2026-10-01
Changed
- Settings, redesigned around a sidebar — the seven-toolbar-tab preferences window is now a NavigationSplitView settings window in the macOS System Settings idiom: a grouped sidebar (General / Runtime / Features) with an orange attention badge on Apple Containers when the boot kernel is unregistered, and panes of stacked groups. Rows use the convergent anatomy from the reference apps (Linear, Buffer, Vercel, Railway): label + one-line description with the control trailing right, hairline separators in 10pt-radius cards, status cards crowning each pane with the primary action in a trailing header slot, and destructive actions quarantined in red-tinted danger groups at the bottom. Every group carries a one-sentence explanatory caption; About gains website/repository/releases links and a copyable version. Removes the NSView frame hack (window gets a proper default size), the fixed 140/280 label/control grid, and the per-tab layout inconsistencies it papered over (two copy idioms, GroupBox outlier, AnyView-erased status cards, hand-rolled boot-kernel dot layout). Conventions documented in DESIGN.md §18.
[0.8.3] — 2026-09-28
Changed
- Settings, rebuilt for consistency — every tab now renders from one shared component layer (
SettingsComponents.swift): a single labeled-row grid (fixed 140pt label / 280pt control columns), one status display (colored dot + headline + detail + action), one caption style, one spacing rhythm, and one clipboard idiom. Previously each of the seven tabs invented its own layout — five different label-column widths, three caption styles, six hand-rolled status rows — so the same kind of control sat differently on every tab. The conventions are documented in DESIGN.md §18; the orphaned Supaglue integrations view (384 lines, unwired since the agents stack went dormant) is removed.
Fixed
- Settings window fits its content — it no longer adopts the main window's width; it opens at 720×640, sized for the grouped form, still centered over the main window.
- Gateway app addresses are clickable — the
*.keghostnames in Settings → Gateway (App addresses and Custom routes) are now links that openhttp://<name>.keg:8080in the browser, instead of read-only text.
[0.8.2] — 2026-09-23
Fixed
- Opening a container's Logs no longer crashes the app — picking Logs from the tab dropdown of a running container quit Keg outright, via two independent faults on the same path: the log-follow task parked on a
Duration(Task.sleep(for: .seconds(Int.max))) that overflows the concurrency runtime's clock math and traps seconds after the tab opens; and the view's toolbar items were declared from inside the inspector column, which throws inside AppKit's NSToolbar insertion on macOS 26 the moment the tab mounts. The level filter, Follow toggle, Copy All, Clear, and the search field are now an inline control row inside the Logs view; the Files tab's Upload/Refresh and the Environment tab's variable search moved inline for the same reason — inspector-embedded views no longer touch the window toolbar at all.
Added
- Boot-kernel auto-repair — builds on 0.7.1's one-click repair: Keg now installs the recommended kernel by itself when it finds no default registered (once per session; the manual repair buttons in the Run sheet, Health panel, and Settings stay for retries). The repair also heals the start path — with no kernel registered the runtime aborts
container system startat an interactive install prompt that can never be answered, which read as a mysterious start failure after everybrew upgrade container; Keg now detects that abort, repairs, and retries Start on its own.
[0.8.1] — 2026-09-22
Fixed
- Image sizes respect the configured data location — the Images list (and the Docker API's size field) read the store from the Data Location set in Settings instead of always assuming the default (
~/Library/Application Support/com.apple.container). On machines that keep container data on another volume, every image silently showed only its compressed download size (nginx:latest: ~62 MB) instead of its real on-disk footprint — compressed blobs plus the unpacked ext4 snapshot (~1.42 GB). Default-location installs were unaffected.
[0.8.0] — 2026-09-22
Added
- Cooper runs without Apple Intelligence — a second brain: any OpenAI-compatible chat-completions server (OpenAI, OpenRouter, Groq, DeepSeek, Mistral, Together, Fireworks, or local Ollama / LM Studio / vLLM). When the on-device model is unavailable — Apple Intelligence turned off, this Mac not eligible, or its model assets still downloading — Cooper automatically switches to the configured remote server; Settings → Cooper → Model backend can also force either path, and the panel header shows which model is answering. Tool calling, permission modes, approval cards, and the repeat-call guard are identical on both paths (the remote model gets every tool at once — no small-model tool subsets).
- Remote model setup — provider presets with a one-click server URL, a "List" button that reads the server's model catalog, and the API key stored in the macOS Keychain (never in plain preferences). A "Set Up a Remote Model…" recovery path appears in the Cooper panel when Apple Intelligence is off and nothing is configured yet.
- Thinking-model support on the remote path — request-side
reasoning_effort(low/medium/high, sent only when explicitly chosen since providers reject unsupported values); response-side reasoning is separated from the answer whether the server streamsreasoning_content/reasoningfields or the model inlines<think>tags, including tags split across stream chunks. Thinking renders as a collapsible section; "Off" neither requests nor shows it. Provider-specific switches (Qwenenable_thinking, temperature,max_tokens) go through an Advanced Extra Request JSON field merged last into every request. - Cooper's knowledge base covers its own backends (new
agent_backendtopic), and the guide documents the fallback.
Fixed
- Remote-path robustness: context-overflow replies retry with a hard-trimmed history that never leaves tool results orphaned from their calls (the message shape providers reject); 429s back off exponentially; 401/404/5xx surface the server's own error message with actionable copy.
[0.7.1] — 2026-09-21
Added
- Boot-kernel setup & repair — container runtime 1.4+ requires an explicitly registered default boot kernel and refuses to start any new container with "default kernel not configured for architecture arm64" until one exists — exactly where a Homebrew runtime upgrade (
brew upgrade container) leaves an otherwise healthy install, with nothing but the raw CLI error as a hint. Keg now detects the missing registration and offers a one-click Install Recommended Kernel (runscontainer system kernel set --recommended --force, pinned to your data location) in the three places users meet the problem: the Run sheet — before the image pull is wasted, with Run disabled until fixed — the Health panel, and Settings → Apple Containers. Reinstall re-fetches the recommended kernel after future runtime upgrades, a raw CLI kernel failure in a run is translated into an actionable message (for the race past the precheck), and Cooper's knowledge base covers the condition.
[0.7.0] — 2026-09-21
Added
- Cooper, the built-in agent — an on-device agent on Apple's FoundationModels (
SystemLanguageModel.default): no cloud calls, no account, nothing leaves the machine. Ask "what's running?" or "why did my container fail?", have it pull an image, bring up a Compose stack, or navigate the app ("open the logs view"). The architecture is sized to the on-device model: each turn classifies intent, then runs one specialist session with at most five tools (overview, containers, images, compose, system/k8s); the maintained knowledge base is served on demand via akeg_docstool instead of inflating the context; live state arrives as a compact per-turn snapshot; transcripts trim on overflow with one retry; throttled turns back off exponentially. - Cooper permission gate — Settings → Cooper picks the mode: Explore (look, never touch), Ask (an approval card for every change), Execute (routine actions applied autonomously). Destructive operations — removing containers/images, compose down, stopping the runtime, deleting the cluster — require approval in every mode. The gate suspends inside the tool call and resumes when you answer the card; the 4th identical tool call in a turn is refused with change-your-approach guidance.
- Cooper conversations persist on-device at
~/.keg/cooperand rehydrate on the next launch (stage tracing indebug.log). Right-click any container or image → "Ask Cooper About This…" opens the panel with the object preloaded; the toolbar button uses a pure-SwiftUI barrel mark. - One instance, one window — a POSIX pid guard makes a second launch focus the existing app instead of racing it (lowest pid survives);
keg://deep links always land in the live window, and a stale/Applicationscopy hijacking the scheme is detected. - Settings rebuilt into six domain tabs — Keg, Apple Containers, Docker, Kubernetes, Cooper, About — with host-bounded sliders that save on a debounce, the runtime's per-machine data location (app-root) settable through a volume browser with a refuse-to-start preflight, and the container config surface exposed: home mount (ro/rw/none) and builder image as grouped rows.
- Docker API completions —
--rmis honored (AutoRemove), the prune routes work (containers, images, networks, volumes), andPOST /waitis bounded so a stalled exit delivery falls back instead of hangingdocker run. - Honest lists — container/image lists carry truth-in-listing subtitles, an All|Running segmented filter with visible counts, and chips that say what they do; volumes can be created from the UI; Compose guards against a stale or missing compose-file path.
- User guide — a twelve-page plain-Markdown docs set (
docs/guide/) covering every app area, linked from the website and in-app help.
Fixed
- A wedged container runtime is survivable and diagnosable: CLI operations run bounded, the runtime reports
.unresponsivewith backoff instead of hanging the UI, and the Health panel surfaces diagnostics with one-click recovery. - The Cooper panel's "Open Apple Intelligence Settings" now opens the Siri & Apple Intelligence pane (the old anchor landed on General on macOS 27).
Known limitations
- Some accepted Docker-API connections never dispatch their first request (the client waits until EOF while an identical fresh connection succeeds) — a
DockerHijackHTTPChannelpipeline race under investigation;/waititself is bounded, but occasionaldocker runEOFs can still surface.
[0.6.0] — 2026-09-18
Added
docker cpworks end to end — file and directory, in and out, including into-directory semantics — via the/archiveendpoints (HEAD stat with the base64X-Docker-Container-Path-Statheader, XPCcopyIn/copyOut, tar handling).- Restart policies:
--restart always / unless-stopped / on-failurepersists as a container label; the event bus (now always polling, no/eventssubscriber needed) revives crashed containers with a crash-loop cap; API stop/kill suppresses auto-restart; a startup sweep revivesalwayscontainers daemon-style. - Late attach: API-started containers keep their stdio in a ring-buffered buffer, so
docker attachon a running container replays recent history then streams live. Attach-before-start (docker run) uses direct pump wiring.keg attach [-i]joins from the companion CLI. - Certification suite (
Scripts/certify-ecosystem.sh): runs compose stacks and Testcontainers against the socket with tool discovery, and writes the pass matrix todocs/certification.md. - CI on a real Mac (
.github/workflows/contract.yml): the 21-check Docker CLI contract suite on a self-hostedmacos-container-runtimerunner on every push/PR. - Homebrew cask (
Casks/keg.rb) ready for submission; installs the app and putskegon PATH.
Fixed
- The crash class behind months of flakiness — XPC fd double-close: Apple's
XPCMessage.set(FileHandle)closes the descriptor after transfer. Every stdio fd Keg handed tocreateProcess/bootstrapdied in-process, and our later closes (or FileHandle deinit) landed on recycled fd numbers — killing CLI pipe reads (NSException) and NIO sockets (EBADF write preconditions) at random. Stdio now transfers dup'ed fds in non-owning FileHandles; our originals close once, at the right time. Verified: 20/20 rapiddocker runwith exact exit codes, 10× exec loop, full contract suite green repeatedly. - Hijacked-connection writes are serialized on the channel's event loop; error responses to HEAD carry no body (Go client connection poisoning); directory stat mode carries Go's
ModeDirbit sodocker cpresolves destinations correctly.
Known issues
- After heavy kill -9 churn, Apple's runtime vmnet service can wedge machine-wide (
container network create/listhangs). Fixed by a reboot — a runtime-level issue, tracked for an upstream report if it reproduces.
[0.5.0] — 2026-09-18
Added
- Docker CLI daily-driver parity: the Docker API socket now backs the full
dockerworkflow, verified end-to-end against the real docker CLI (29.x) byScripts/docker-cli-contract-test.sh— all 15 checks green:docker runstreams stdout/stderr and propagates real exit codes (verifiedexit 7round-trips)docker execworks (including-istdin and exit codes) via a from-scratch HTTP connection hijack: Hummingbird has no upgrade support, so Keg runs a custom NIO child channel that answers101 Switching Protocols+Upgrade: tcpand splices the socket to the container's stdio over XPCPOST /waitfollows the daemon's ≥1.30 contract — headers flush immediately, the JSON body arrives at exit — which the CLI's synchronous ContainerWait handshake requires before it will issue/startdocker stats(XPC-backed CPU/memory/network/pids with pre/post samples for CPU%),docker events(poll-differed lifecycle stream that also finally dispatches the webhook manager),docker volume create/ls/rm,docker system df,containers prune, and the classicPOST /build(tar context, streamed NDJSON output) used by API clients like Testcontainersdocker pull/pushstream Docker-format JSON progress mapped from the Apple CLI's plain progress- API version negotiation is honest:
HEAD /_ping(auto-generated) carriesApi-Version,OSType,Builder-Version
- Native advantages made visible:
- Isolation banner in the container inspector: every container runs in its own microVM with a dedicated kernel — the security property Docker Desktop and OrbStack (shared kernel) can't offer, now stated where operators look.
- Memory honesty: the inspector shows used-vs-limit while running and explains that freed pages stay inside the VM until stop/restart (Apple's runtime doesn't return pages to macOS mid-run) — turning the known limitation into actionable guidance.
- x86 images via Rosetta: the pull sheet picks arm64 (native) or amd64 (Rosetta);
POST /images/createhonors?platform=, and create requests carryingPlatform(e.g."linux/amd64") pull and run the amd64 variant — verifieduname -m→x86_64. - Real networks: Docker API network create/delete now provisions actual runtime networks (
container network creategets its own subnet — verifiedkeg-net-test → 192.168.65.0/24), and create requests with a namedHostConfig.NetworkMode(what compose sends) attach the container to that network via--network. In-memory bookkeeping remains only as an error fallback.
kegcompanion CLI, installed from the app: a Foundation-only terminal client for Keg — no docker CLI required. Ships inside Keg.app (Contents/SharedSupport/bin/keg) and installs onto PATH with one click from Settings → Keg CLI (orkeg installitself): first writable of/usr/local/bin,/opt/homebrew/bin,~/.keg/bin, the last with a copyable PATH line. Commands:status,doctor(pass/fail stack checks with hints),version,env(DOCKER_HOST exports),ps [-a],images,logs [-f] [-n N](stdcopy demuxed, follow until exit),exec,start/stop/restart/rm,open [section]— akeg://deep link that focuses the named section in the app (scheme registered in the bundle Info.plist) — andinstall/uninstall. Verified round-trip live: install →keg statusfrom PATH → uninstall. Built as targetkegcli(the build dir is case-insensitive; akegartifact would clobber theKegapp binary) and symlinked askegon PATH.keg exec: full docker-exec semantics in the companion CLI — the client side of the connection hijack.keg exec [-i] [-t] [-e K=V]… [-w dir] [-u user] <id> cmd…streams stdout/stderr live (stdcopy demuxed to the right descriptors), forwards stdin (-i, with half-close on EOF), puts the terminal into raw mode for-tand sends PTY resizes on window changes, and propagates the command's real exit code. Verified against the running app: multi-frame streams, stderr routing, env/workdir, exit codes, TTY sessions, and clean 404s for unknown containers.- Launch at login (Settings → Docker API) via SMAppService, with socket cleanup on quit — a stale bound socket makes every Docker client hang instead of failing fast.
- New dependencies: NIOHTTPTypesHTTP1 (swift-nio-extras) and ContainerizationOS (containerization 0.42.0, matching apple/container 1.3.1) for the hijack channel and exec resize.
Fixed
- Docker API errors now carry proper statuses: typed Keg errors map to Docker's HTTP semantics (404 for missing containers/images/webhooks, 400 for bad requests) instead of blanket 500s —
keg execand the docker CLI both surface real messages now; exec create validates container existence up front. - Stale-socket guard hardened: the launch-time liveness probe before unlinking
~/.keg/docker.socknow waits 2s instead of 300ms — a slow moment on the owner's side (test hosts, heavy load) can no longer cause a live app's Docker API socket to be unlinked.
Known limitations
docker buildfrom the docker CLI requires the BuildKit protocol (docker 29 dropped the classic builder client-side); the classicPOST /buildworks for API clients. BuildKit session support is future work.- Attaching to an already-running container (
docker attach) is unsupported — init-process stdio is fixed at start (same limitation as Apple's own CLI).
[0.4.0] — 2026-09-17
Added
- Compose Topology: the Compose screen renders an interactive dependency graph of the file's services — nodes show service, image and live state; arrows point at dependencies, reading left to right like request flow. Click a node to trace its edges; right-click for logs, restart, or copy. Derived from the same parsed plan as "What Will Run".
- Real embedded terminal: the Terminal section is now a genuine pseudo-terminal (SwiftTerm) running your login shell with full VT100/xterm support — colors, line editing, full-screen apps like vim.
DOCKER_HOST,KUBECONFIGand HomebrewPATHare pre-wired; presets type into the live session instead of restarting it. - Welcome screen with live sidebar preview: picking an experience level shows exactly what the sidebar will look like before you commit.
- Sidebar reoriented per experience level: Getting Started groups tasks in plain language (My Apps, Essentials); the full operator surface appears at Comfortable/Full Control. New sidebar footer switches levels in place — no Settings trip.
- New dependency: SwiftTerm 1.11.2 (MIT) for the terminal emulator.
Fixed (0.3.1)
- Window-resize crash with the container inspector open: resizing the window with a container selected aborted with
NSGenericException("more Update Constraints in Window passes than there are views in the window"). The inspector's Overview tab used an adaptive-columnLazyVGridfor its stat cards; the column count changed with the proposed width, so the inspector's reported minimum size oscillated during live resizes until AppKit's update-constraints loop guard fired. Replaced with a fixed two-column grid. - Stale sidebar system summary: the "Containers N/N · Images · API latency" row above the sidebar sections fetched metrics once per appearance and never refreshed, so it showed launch-time counts all session. It now polls every 5s (task-cancelled when hidden, sharing the metrics actor's cache with the dashboard).
Research
- Craft + Notion Agents analysis for Keg: completed a two-round research sweep comparing Craft Agents and Notion Agents against Keg's current Agents area.
- Verified strongest overlap: sources, skills, permission modes, session workflow metadata, automations, and auditability
- Verified Keg already has usable account/auth, agent CRUD, session list/detail, and local storage primitives for skills/sources
- Identified biggest gaps: skills/sources persistence wiring, source testing/runtime activation, permission modes, run history, and automation triggers
- Recommended immediate tranche: finish Sources + Skills, then add permission modes and run logs before any automation or shared/autonomous agent layer
- Follow-up extension added Open Agents as third comparison target; reinforced long-term recommendation to separate workflow orchestration from execution substrate if Keg later adopts remote/headless agent runs
Added
- Agent Area Foundation: Initial Managed Agents API implementation for Keg
- Core types: Agent, AgentEnvironment, Session, SessionEvent
- Agent tools: Toolset, Custom tools, Built-in tools (bash, read, write, edit, glob, grep, web_fetch, web_search)
- MCP server support
- Skills configuration
- Full CRUD API client with proper authentication headers
- 34 spec tests with 100% coverage
Files Added
Sources/Keg/Agent/Types.swift- Agent and tool typesSources/Keg/Agent/EnvironmentTypes.swift- Environment configurationSources/Keg/Agent/SessionTypes.swift- Session and event typesSources/Keg/Agent/ManagedAgentsClient.swift- API clientTests/KegTests/ManagedAgentsSpec.swift- API specification tests
Research: Integration Platforms at Scale (2026-04-15)
Research Completed
- Topic: How to enable integrations at scale like Nango.dev
- Sources: 6 primary sources verified
- Output:
outputs/integration-platforms-at-scale.md
Key Findings
- Nango: 700+ APIs, auth abstraction + TypeScript functions [1]
- Supaglue: Best OSS alternative for B2B SaaS (Apache 2.0) [2]
- Airbyte: 300+ connectors for data pipelines [3]
- Self-hosted costs: $80-400/month vs managed $0-1000+/month
Keg's documentation. Something wrong or missing? Say so.