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
static_file
What it is
Shared infrastructure for attachments and uploads — a hex crate for
resolving static file (SFS) references into URLs or metadata without callers
depending on attachment directly.
Start here
src/domain/ports.rs: theStaticFileResolverport callers depend on.src/inbound/attachment.rs(featureattachment): adaptsattachmententities onto the port.src/outbound/sfs_client.rs(featureoutbound): resolves viastatic_file_service_clientagainst the real static file service.
Scope
- Owns: the port abstraction between "something references a static file" and "static file service resolves/serves it."
- Not here: the static file service's HTTP client itself →
crates/static_file_service_client; attachment storage/lifecycle →crates/attachment.
Boundaries
- Depends on:
macro_user_id,non_empty; optionalattachment,model-entity(featureattachment),reqwest(featureoutbound). - Used by:
crates/ai_tools,crates/agent_trigger,services/agent_harness_service,services/agent_trigger_service,services/agent_harness_service.
Recipes
- Resolve a new kind of static file reference:
src/domain/ports.rs(port method) →src/inbound/attachment.rsor a new inbound adapter → composition root wiring the outbound adapter.
Checks
cargo test -p static_file(SQLX_OFFLINEunset).
Related
- Rules:
.agents/rules/rust/architecture.md