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.
Service Kit: Shared TypeScript service helpers
Small helpers shared by Web, Node services, Voice Runtime, and the local installation core.
Common Commands
pnpm --filter @linger/service-kit check: typecheck, lint, and test the package.
Structure
src/index.ts: isomorphic entry (isRecord,isNodeError,asError,displayText,sleep, fetch test-double text helpers, andsourceRegion/orderByRegion, which order mirrors of one download by theSIMPLEX_REGIONcontract inscripts/installs/README.md). It must not importnode:modules because the Web app bundles it, and it stays free of relative.jsimports so raw Node type-stripping can load it directly.src/byok-endpoint.ts: isomorphic BYOK address entry (byokProtocolFor,defaultByokEndpoint,normalizeByokPath,normalizeByokBaseUrl,validByokPath,isByokProtocol, and the BYOK path pattern and runtime default constants), exported as@linger/service-kit/byok-endpoint.src/messages.ts: isomorphic message formatting (defineMessages,formatMessage,resolveMessage; plurals throughIntl.PluralRules,{name}placeholders and<tag>spans), exported as@linger/service-kit/messagesfor the Web client and the desktop shell. It holds no catalog and no language choice.src/node.ts: Node-only entry (sha256Hex,createJsonLogger,serviceCredential).serviceCredentialtakes the environment from its caller and is checked againstcontracts/fixtures/service-credentials/vectors.json.src/json-logger.ts: one-JSON-line logger whose shape matches Agent'sAgentLogger; keep the redaction rules aligned withapps/node-services/src/agent/observability/agent-log.ts.
Important Conventions
- Add a helper here only when two or more apps need identical behavior; keep the package free of runtime dependencies and environment variables.
- The package is built into the Web image (
apps/web/Dockerfile) and the node-services image (apps/node-services/Dockerfile, which also carries the voice runtime); a new consumer must add the package to that image's Dockerfile.