Monorepo
One git repository holds the Python packages and the TypeScript packages. uv owns the Python side. pnpm owns the TypeScript side. just is the single entry point that runs both. The two sides meet in packages/protocol/gen, where Python models are exported as TypeScript types.
Layout
golem/
├─ pyproject.toml # uv workspace root (not an installable package)
├─ uv.lock # one lockfile for every Python package
├─ package.json # pnpm workspace root
├─ pnpm-lock.yaml # one lockfile for every Node package
├─ pnpm-workspace.yaml
├─ justfile
├─ docs/ # the docs, and the site over them: @golem/docs (VitePress)
└─ packages/
├─ protocol/ # Python: golem-protocol
│ └─ gen/ # generated JSON Schema and TypeScript
├─ daemon/ # Python: golem
├─ client/ # TypeScript: @golem/client
├─ cli/ # TypeScript: @golem/cli (bin: golem)
├─ tui/ # TypeScript: @golem/tui
└─ web/ # TypeScript: @golem/webPython 3.12 is pinned in .python-version. CI installs Node 24.
Python
The root pyproject.toml is a uv workspace. tool.uv.package is false, so the root is not built or installed. Its members are packages/protocol and packages/daemon.
uv sync --all-packages creates one .venv at the repository root and installs every member into it, editable. packages/daemon depends on golem-protocol through tool.uv.sources with workspace = true, so that dependency resolves to the local package.
Each member is a Hatchling project and names its import package explicitly (golem_protocol, golem). Dev tools live in the root dev dependency group, which uv installs by default: pytest, pytest-asyncio, ruff, and pyright. Ruff, pyright, and pytest are configured in the root pyproject.toml and apply to both packages. Recipes unset VIRTUAL_ENV before calling uv, so an activated virtualenv from another project is ignored and uv uses this repository's .venv.
| Package name | Import | Role |
|---|---|---|
golem-protocol | golem_protocol | Pydantic models and schema export |
golem | golem | Daemon: paths, configuration, logging, socket server |
TypeScript
pnpm-workspace.yaml includes packages/client, packages/cli, packages/tui, and packages/web. The root package.json is private and sets packageManager to pnpm@10.29.3. It depends on json-schema-to-typescript for just gen, and on @golem/cli so pnpm exec golem resolves the bin.
| Package | Role |
|---|---|
@golem/client | Client shared by the TUI and the CLI. @golem/client runs in any runtime. @golem/client/node adds the Unix socket. Imports generated types from packages/protocol/gen. |
@golem/cli | The golem bin. status uses the client. daemon subcommands run python -m golem. |
@golem/tui | Ink status line. Depends on @golem/client. |
@golem/web | The web UI, built with Vite. Phase 10. |
Each package carries its own TypeScript, ESLint, and typescript-eslint devDependencies. tsconfig.json includes that package's src and ../protocol/gen/**/*.ts. packages/protocol/gen/package.json sets "type": "module" so the value exports in version.ts typecheck. The client and the CLI import those files with a .ts extension, which Node runs with type stripping. There is no npm package for the protocol.
The crossing point
just gen runs in this order:
uv run python -m golem_protocol.codegenwritespackages/protocol/gen/*.schema.jsonfrom the Pydantic models.pnpm exec json2tswrites the matching*.tsfiles next to those schemas.export_versionwritesversion.tsfromPROTOCOL_MAJORandPROTOCOL_MINOR.
The generated files are committed. just check copies packages/protocol/gen, runs just gen, and diffs the result. A drift fails the check.
Commands
| Command | What it runs |
|---|---|
just | List the recipes below |
uv sync --all-packages | Install Python packages and the dev group into .venv |
pnpm install | Install the root tool and the TypeScript packages |
just gen | Regenerate JSON Schema and TypeScript |
just lint | ruff check, ruff format --check, eslint in the TypeScript packages |
just fmt | ruff format and ruff check --fix |
just typecheck | pyright (strict) and tsc --noEmit in the TypeScript packages |
just test | pytest, then the TypeScript package tests |
just check | gen, then lint, typecheck, test, and docs-build; fails if gen/ drifted or a docs link is dead |
just docs | The docs site at localhost:5173/, reloading as you edit |
just docs-build | Builds the docs site into docs/.vitepress/dist (ADR-034) |
just golem … | The golem CLI: just golem opens the web UI, just golem tui the chat (in the repository root), and status, daemon install|start|stop|logs work too |
just tui | The chat TUI, started straight from packages/tui in the folder you ran it from, so its session works there |
CI runs uv sync --all-packages --frozen, pnpm install --frozen-lockfile, then just check. Both lockfiles are committed, so CI installs the same versions as a local sync.