Packages
@downcity/city/local
Use City's local database, paths, repositories, environment assembly, and Plugin loader.
@downcity/city/local provides the local host capabilities shared by the CLI and Desktop:
the SQLite adapter, paths, product schemas, repositories, environment assembly, and Plugin loader.
import {
LocalDatabase,
AgentRepository,
WorkspaceRepository,
ensure_local_schema,
} from "@downcity/city/local";
const database = new LocalDatabase({ filename: database_path });
ensure_local_schema(database);
const workspaces = new WorkspaceRepository(database);
const agents = new AgentRepository(root_path);The CLI and Desktop create these dependencies in their own composition roots, read configuration,
and explicitly call new Agent(). The local subpath does not create an Agent, Workspace, Model, or
City. Workspace and platform settings are stored as plaintext JSON, with 0600 permissions on the
local database for user-level isolation.