Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
code_mode_assets
What it is
Agent code mode's generated assets: the public SDK and Handlebars bundled for
Deno, the agent SDK documentation catalog, the SDK operation catalog (label,
method, path and whether it writes), and the SDK's TypeScript declarations
routine code is type-checked against. They are
built from packages/sdk when this crate compiles and are never committed.
How it works
build.rs takes the assets from exactly one place:
CODE_MODE_ASSETS_DIRset (Nix builds and Rust CI): that directory, built by thecode-mode-assetsflake package from the Nixnode_modules. Rust CI restores it from Namespace's remote cache, keyed by its store path, and builds it only on a miss (steps::code_mode_assets). A build restores node_modules the same way, under its own store path.- Unset (local cargo): it runs
packages/code-mode-sdk/scripts/generate.tswithbunintoOUT_DIR, rerunning when SDK, generator or lockfile sources change.
A failed run or a missing file fails the build; there is no stale fallback.
Scope
- Owns: building and embedding the assets.
- Not here: the generator (
packages/code-mode-sdk), process isolation (crates/code_execution), documentation selection (crates/agent_code_mode).
Checks
cargo build -p code_mode_assetsafterbun install --frozen-lockfileat the repository root and inpackages/sdk.nix build --no-link .#code-mode-assetsafter changing the generator's inputs ornix/cloud-storage.nix.
Gotchas
- A new generator input outside
GENERATOR_INPUTSinbuild.rsor thecodeModeAssetsSrcfilter innix/cloud-storage.nixleaves cargo or Nix builds stale; add it to both. - Compiling this crate (and every dependent, including DSS and the agent
harness) needs bun and both
node_modulesinstalls unlessCODE_MODE_ASSETS_DIRis set.