Jam architecture main at 59f67f5d0 · 2026-09-29
View source

#Codebase metrics

On this pageSize by crateChurn hotspotsLargest filesInside manager.rsProvider knowledge outside the provider crateAPI surfaceActivity

Sources: git ls-files, git log (90-day window ending at the snapshot commit), crates/jam-store/src/migrations.

Snapshot: commit 59f67f5d0 from 2026-09-29. Line counts include blank lines and comments. "Test" means test files, test kits, fixtures, stories, and Rust #[cfg(test)] items inside source files. The generated apps/desktop/src/lib/bindings.ts and the lock files are excluded from both line counts and churn.

Measure Value
Rust lines, production / test 300,858 / 276,482
TypeScript and JavaScript lines, production / test 131,887 / 248,316
Source files counted 1,719
Non-merge commits in the 90-day window 2,891
Control methods / daemon routes / Tauri commands 255 / 253 / 250
SQLite tables / migrations 76 / 88
Daemon event kinds 59

#Size by crate

Production and test lines per crate or app. The desktop UI and jam-manager hold the most production code, followed by jam-host.

Lines of code by crate or app

Crate or app Production Test Files Commits touching it
desktop UI 129,818 135,428 1128 7,296
jam-manager 95,767 124,798 76 2,415
desktop E2E 0 110,852 229 1,970
jam-host 59,656 50,277 65 1,283
jam (bins) 26,800 22,968 22 657
jam-store 23,079 15,149 15 559
jam-desktop (Tauri) 19,057 10,309 37 513
jam-domain 17,545 9,254 40 513
jam-transport-band 7,969 12,137 17 271
jam-daemon 4,505 6,598 4 276
jam-setup 5,460 4,706 7 114
jam-analytics 4,895 3,573 20 116
jam-core 4,455 3,660 12 81
jam-client 5,223 2,321 2 177
jam-contract 7,205 293 6 219
jam-ipc 3,056 1,176 6 131
plugin: copilot-jam-extension 2,069 2,036 2 100
jam-wire 2,925 648 1 149
jam-usage 1,629 1,943 3 16
jam-auth 2,026 1,313 1 20
jam-analytics-local 1,653 1,173 1 16
jam-service 1,649 873 2 30
jam-transport 2,002 407 4 64
jam-managed-config 1,230 620 1 9
jam-discovery 847 223 2 25
jam-secure-store 554 359 1 10
jam-update 503 364 4 12
jam-test-support 0 799 2 20
jam-tls 435 339 2 11
jam-windows-ipc 408 141 2 20
jam-version 120 24 2 4
jam-macos-notifications 117 22 2 7
jam-awake-clock 88 15 1 4

"Commits touching it" counts file changes, so one commit that edits three files in a crate counts three times.

#Churn hotspots

Files ranked by production lines multiplied by the number of commits that changed them in the window. A large file that changes often is where a refactor pays off first and where merge conflicts concentrate.

Churn against size

File Production lines Commits Size × churn
crates/jam-manager/src/manager.rs 51,465 663 34,121,295
bins/jam/src/main.rs 17,013 296 5,035,848
crates/jam-host/src/codex/app_server.rs 10,034 246 2,468,364
crates/jam-store/src/sqlite.rs 13,130 154 2,022,020
crates/jam-contract/src/lib.rs 6,054 188 1,138,152
apps/desktop/src/App.tsx 5,116 212 1,084,592
apps/desktop/src/stores/daemon.ts 7,555 134 1,012,370
crates/jam-host/src/sandbox.rs 11,067 82 907,494
crates/jam-manager/src/worker.rs 6,095 144 877,680
crates/jam-client/src/lib.rs 4,901 173 847,873
apps/desktop/src-tauri/src/commands.rs 5,244 140 734,160
apps/desktop/src/components/blocks/LocalAgentCreatePanel.tsx 5,318 130 691,340
crates/jam-daemon/src/lib.rs 4,505 138 621,690
crates/jam-host/src/copilot/sdk.rs 4,818 111 534,798
crates/jam-store/src/file.rs 6,191 81 501,471
crates/jam-domain/src/host_session.rs 4,662 96 447,552
crates/jam-wire/src/lib.rs 2,925 149 435,825
apps/desktop/src/components/blocks/types.ts 2,276 155 352,780
crates/jam-host/src/claudecode/owned/runtime.rs 4,172 83 346,276
crates/jam-host/src/acp.rs 4,534 61 276,574

#Largest files

File Lines Production Test
crates/jam-manager/tests/lifecycle.rs 68,008 0 68,008
crates/jam-manager/src/manager.rs 58,146 51,465 6,681
bins/jam/src/main.rs 27,944 17,013 10,931
apps/desktop/e2e/real-agents/specs/first-real-case.spec.ts 26,320 0 26,320
crates/jam-host/src/codex/app_server.rs 23,046 10,034 13,012
crates/jam-store/src/sqlite.rs 19,786 13,130 6,656
crates/jam-host/src/sandbox.rs 16,536 11,067 5,469
crates/jam-manager/src/worker.rs 10,610 6,095 4,515
crates/jam-host/src/acp.rs 9,863 4,534 5,329
crates/jam-host/src/copilot/sdk.rs 9,325 4,818 4,507
apps/desktop/src/stores/daemon.test.ts 8,555 0 8,555
crates/jam-host/src/claudecode/owned/runtime.rs 8,375 4,172 4,203
crates/jam-domain/src/host_session.rs 8,331 4,662 3,669
crates/jam-store/src/file.rs 7,634 6,191 1,443
apps/desktop/src/stores/daemon.ts 7,555 7,555 0

#Inside manager.rs

crates/jam-manager/src/manager.rs holds 51,465 production lines in one file. The regions below come from its impl blocks and // ── Title ── section comments, in file order. "Functions" counts methods declared at the top indentation of each region.

Regions of manager.rs by production lines

Region Starts at line Production lines Functions
Module header, types, and helpers 1 2,655 31
impl Manager, lines 3376–9380 3376 6,005 199
OAuth token refresh + auth_required state 9381 3,566 69
impl Manager, lines 13481–26269 13481 12,789 162
Peer add-availability 26270 865 31
Human/room reads 27135 8,050 128
Room organization 35185 27 2
Kickoff 35212 724 6
Room plan 35936 569 17
Room artifacts 36505 2,239 54
Chat proxies 38744 175 7
Lifecycle system messages 38919 172 6
Archive 39091 1,842 24
Layer-1 authoritative lane Task verbs 40933 1,065 24
LAN discovery 41998 527 17
Layer 2 42525 207 11
impl Manager, lines 43243–45157 43243 1,840 22
impl Control for Manager (trait adapter) 45158 7,601 261
CLI token pairing 56676 547 2

#Provider knowledge outside the provider crate

Production references to HostTransport:: variants in files outside crates/jam-host. Extension seams explains what these references do.

HostTransport references outside jam-host

File References
crates/jam-manager/src/manager.rs 95
crates/jam-domain/src/host_session.rs 38
crates/jam-store/src/sqlite.rs 21
bins/jam/src/main.rs 10
crates/jam-manager/src/analytics.rs 9
crates/jam-manager/src/runtime_host.rs 8
crates/jam-domain/src/agent_event.rs 3
apps/desktop/src-tauri/src/commands.rs 1
bins/jam/src/agent_management.rs 1
crates/jam-manager/src/managed_sandbox_kit.rs 1
crates/jam-manager/src/worker.rs 1

Provider name literals ("codex", "claudecode", "claude", "copilot", "opencode", "cursor") in production code outside crates/jam-host:

File Literals
bins/jam/src/main.rs 20
crates/jam-manager/src/manager.rs 20
crates/jam-domain/src/host_session.rs 16
apps/desktop/src-tauri/src/integration_setup.rs 12
crates/jam-setup/src/claude.rs 9
crates/jam-setup/src/coding_agents.rs 8
bins/jam/src/jamd.rs 7
crates/jam-usage/src/lib.rs 7
bins/jam/src/mcp/install.rs 6
crates/jam-store/src/file.rs 6
bins/jam/src/agent_management.rs 5
crates/jam-store/src/sqlite.rs 5
crates/jam-analytics/src/contract.rs 4
crates/jam-domain/src/workitem.rs 4
apps/desktop/src-tauri/src/commands.rs 3

#API surface

Control methods per trait section, split by which client calls them. "Neither" means the scan found no desktop command and no CLI call; such a method may still have another caller, such as a hook, or be unused.

Control API methods by area and client

#Activity

Non-merge commits per week across the repository's history, with the running total.

Commits per week

Schema migrations by the month they landed on main, with the running total. Each migration is one step in the MIGRATIONS array of crates/jam-store/src/sqlite.rs.

Schema migrations added per month

Scroll to zoom, drag to pan.