Linger is An Open-Source Personal Agent That Runs Fully on Your PC. We aim to break Big Tech’s grip on AI by bringing powerful local AI to everyday computers through efficient model–harness co-design, so everyone can run their own.
Local Computer Conventions
Boundary
- This directory owns the resident Local Computer Daemon, its local control CLI, outbound Runner Gateway transport, workspace grants, provider process supervision, and Runtime execution.
- The Go implementation under
local-daemon/is the only Local Computer Daemon and Runtime execution implementation, andlocal-daemon/cmd/linger-computeris the control CLI the release bundle ships ascli/linger-computer. The bundled Node runs only theteamhubCLI and the managed Computer tools. - The Desktop app (
apps/desktop) ships the same Daemon and runs it as its child. Adesktopconfig section selects Desktop mode: no self-update, shutdown when stdin closes, status lines on stdout, and the app's TeamHub CLI directory. - It consumes generated Runner Gateway contracts and shared Runtime packages.
It must not import another
apps/*source tree or own TeamHub records, Agent orchestration, model selection, or Room callback behavior. - It executes the local-model library actions a Computer owner chose
(download, cancel, load, unload, remove, refresh) through the installer's
localmodelstool, but it never chooses a model: every action names the model the owner picked, and fit, placement and recommendation come fromlocalmodels.
Structure
local-daemon/is a Go module. Itsinternal/daemonowns the daemon lifecycle;internal/process,internal/provider, andinternal/workspacecontain local execution mechanics;internal/lingercontains Linger transport, identity, process-instance lease, Registration, Context, Local MCP Relay, and Local Skill adapters.internal/computercliimplements the control commands overinternal/computerconfig(the config parser and process environment shared with the Daemon),internal/platform/privatefs,internal/providerdiscovery, andinternal/linger/control(control client and the Daemon owner record). It never re-implements a Daemon mechanism.Native provider clients live in
internal/provider/native; process-tree helpers live ininternal/process; runtime-home helpers live ininternal/workspace. Keep tests next to their implementation.Context refresh publishes validated input files atomically into a stable workspace and never deletes local writable output or a running provider's cwd. Every Ensure also creates whichever files of the Context's own
agent/package project (pyproject.tomlfor uv,package.jsonfor npm) are missing and never replaces one the Agent changed.cmd/linger-computer-launcheris the stable Windows command: aslinger-computer-<environment>.exeit runs the active bundle's CLI, and ascli/teamhub.exethe bundled Node TeamHub CLI. The Daemon's Windows-onlyplatformsubcommand serves the Windows installer helper (owner-only files, process identity, owned-process cleanup); nothing else calls it.scripts/builds the development bundle, andtests/holds the Vitest checks of the bundle tools and the Runner Gateway wire against the Go Daemon. Do not add a second Runtime detector, Runtime executor, Gateway client, operation ledger, or daemon entrypoint outsidelocal-daemon/.Add grant, runner-supervision, and other CLI feature directories only when their behavior and colocated tests are implemented.
Keep process entrypoints thin over owning modules. Do not add nested export-only barrels.
Do not use
host,runtime host, orlocal hostas names for the Go process; uselocal-daemonor Local Computer Daemon.
Runtime And Safety
A Pi background model call uses one ephemeral RPC turn with no tools on whatever model Pi's profile selects by default, local or remote; the Daemon does not check which.
Default tests use deterministic providers and real fixture child processes; they never call a live model.
Process-test watchdogs are harness budgets for loaded developer machines, not product startup or shutdown SLAs. Do not add retries or weaken lifecycle, process-identity, or cleanup assertions to handle timing variance.
A wire request never supplies a local path, executable, environment, or credential. Resolve canonical workspace grants before invoking an installed Runtime provider.
Do not commit runtime state, PID files, sockets, logs, credentials, or build output.
Release Versioning
- A deployment ships the Computer built from its own commit inside the
node-services image, and a Daemon upgrades whenever its bundle's
app-sha256differs from the Agent'starget_release. A Daemon change therefore needs no version bump to reach Computers. - Bump
apps/computer/package.jsononly when raising the version floor or when the Agent Service must tell a release that decodes a new optionalrunner.welcomefield or a new Agent frame from one that rejects it (the Daemon decodes frames strictly and closes the connection on an unknown one). The package version is the source for the bundled CLI and Go DaemonReleaseVersion; it is used for display, the floor, and those fields and frames, never to trigger or order upgrades. - A Daemon can outlive its Agent Service release: a desktop upgrade replaces
the Daemon while the installed services keep running until the owner
updates them. A Daemon-to-Agent frame family added within protocol 2 is
sent only when
runner.welcome'sservice_featuresnames it. - Before reporting a Daemon update as delivered, distinguish an image that
carries the new build from an existing Computer that has actually upgraded
(its active bundle's
app-sha256).
Verification
- During iteration, run the focused
@linger/computertest. Before delivery, runmake check BASE=<target-branch>from the repository root; it includescheck-computer. Also runmake check-computer-releasefor bundle source, package, shared Runtime, or generated Runner Gateway changes. Runmake check-scripts-heavyonly for installer, uninstaller, release generator, publish, or image paths; ordinary Computer tests, fixtures, documentation, and example configuration do not require the full installer lifecycle gate. CI runsmake check-computer-go(the daemon's Go unit tests) whenlocal-daemon/changes; the rest ofcheck-computerstays local. CI does not replace the corresponding local verification. - When installer or lifecycle behavior changes, verify it under a temporary
HOME (
make check-scripts-heavy). Preserve install, safety-failure, rollback, and release integrity coverage unless an explicit equivalent replacement is documented. - Go checks for
local-daemon/must run from that module with focused tests, then throughmake check-computer.