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
[package]
edition = "2024"
name = "databases"
publish = false
version = "0.1.0"
[[bin]]
name = "backfill_formula_cells"
path = "src/bin/backfill_formula_cells.rs"
required-features = ["backfill_binary"]
[features]
default = []
# AI tools. A driving adapter like `inbound`, but for the agent loop rather
# than HTTP, so it needs neither axum nor a router.
ai_tools = [
"dep:ai_toolset",
"dep:anyhow",
"dep:async-trait",
"dep:schemars",
"models_databases/schema",
"ports",
]
# The one-off backfill of formula columns' stored cells.
backfill_binary = [
"dep:clap",
"dep:database_env_vars",
"dep:macro_entrypoint",
"postgres",
"tokio/macros",
"tokio/rt-multi-thread",
]
# Axum HTTP router: ops, schema ops, and saved queries.
inbound = [
"dep:axum",
"dep:macro_authorization",
"dep:model-error-response",
"entity_access/inbound",
"ports",
]
# Capability impls for the unified entity-mutation router (rename, trash,
# restore, permanent delete). `rootcause` is already an unconditional
# dependency, so only the trait crate is pulled in here.
entity_mutation = ["dep:entity_mutation", "ports"]
# Liveness fan-out through the connection gateway.
gateway = ["dep:anyhow", "dep:connection_gateway_client", "outbound"]
# Driven adapters share the port contracts.
outbound = ["ports"]
ports = ["dep:entity_access", "dep:tokio", "dep:tracing"]
# Ordered, filtered reads of a database view.
view_rows = ["ports"]
# Postgres persistence for databases/tables/columns/rows, and cells through
# the properties adapter.
postgres = [
"dep:anyhow",
"dep:entity_access_db_utils",
"dep:properties",
"dep:share_permission_db_utils",
"dep:sqlx",
"outbound",
]
[dependencies]
database_sql = { path = "../database_sql" }
activity = { path = "../activity", default-features = false }
ai_toolset = { path = "../ai_toolset", optional = true }
anyhow = { workspace = true, optional = true }
async-trait = { workspace = true, optional = true }
axum = { workspace = true, optional = true }
clap = { workspace = true, optional = true }
bot_id = { path = "../bot_id" }
chrono = { workspace = true, features = ["serde"] }
connection_gateway_client = { path = "../connection_gateway_client", optional = true }
database_env_vars = { path = "../database_env_vars", optional = true }
entity_access = { path = "../entity_access", optional = true, default-features = false, features = ["ports"] }
entity_access_db_utils = { path = "../entity_access_db_utils", optional = true }
entity_mutation = { path = "../entity_mutation", optional = true }
macro_authorization = { path = "../macro_authorization", optional = true, default-features = false, features = ["axum"] }
macro_entrypoint = { path = "../macro_entrypoint", optional = true }
macro_event_broker = { path = "../macro_event_broker", default-features = false }
macro_event_topics = { path = "../macro_event_topics" }
macro_user_id = { path = "../macro_user_id" }
macro_uuid = { path = "../macro_uuid" }
model-entity = { path = "../model-entity" }
model-error-response = { path = "../model-error-response", optional = true }
models_databases = { path = "../models_databases" }
models_properties = { path = "../models_properties" }
models_permissions = { path = "../models_permissions" }
properties = { path = "../properties", optional = true, default-features = false, features = ["outbound"] }
rootcause = { workspace = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true }
serde_json = { workspace = true }
sha2 = { workspace = true }
share_permission_db_utils = { path = "../share_permission_db_utils", optional = true }
sqlx = { workspace = true, optional = true }
strum = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, optional = true, features = ["rt"] }
tracing = { workspace = true, optional = true }
utoipa = { workspace = true }
uuid = { workspace = true }
url = { workspace = true }
workspace-hack = { version = "0.1", path = "../workspace-hack" }
[dev-dependencies]
entity_access = { path = "../entity_access", default-features = false, features = ["outbound"] }
macro_db_migrator = { path = "../macro_db_migrator" }
model_owner = { path = "../model_owner" }
# The palette the fakes colour new options from.
properties = { path = "../properties", default-features = false }
tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
tower = { workspace = true }