68 lines
1.6 KiB
Markdown
68 lines
1.6 KiB
Markdown
# Схема БД
|
|
|
|
Основная БД Crank Community — PostgreSQL.
|
|
|
|
## Основные таблицы
|
|
|
|
- `workspaces`
|
|
- `users`
|
|
- `user_sessions`
|
|
- `memberships`
|
|
- `operations`
|
|
- `operation_versions`
|
|
- `published_operations`
|
|
- `operation_samples`
|
|
- `agents`
|
|
- `agent_versions`
|
|
- `agent_operation_bindings`
|
|
- `published_agents`
|
|
- `platform_api_keys`
|
|
- `secrets`
|
|
- `secret_versions`
|
|
- `auth_profiles`
|
|
- `invocation_logs`
|
|
- `usage_rollups`
|
|
- `yaml_import_jobs`
|
|
|
|
`memberships` используется как служебная привязка единственного администратора
|
|
к bootstrap workspace.
|
|
|
|
## Operations
|
|
|
|
`operations` хранит текущую карточку operation.
|
|
|
|
`operation_versions` хранит versioned JSON contract:
|
|
|
|
- REST target;
|
|
- schemas;
|
|
- mappings;
|
|
- execution config;
|
|
- tool description;
|
|
- samples metadata.
|
|
|
|
`published_operations` указывает на опубликованную version.
|
|
|
|
## Agents
|
|
|
|
`agents` хранит карточку agent.
|
|
|
|
`agent_versions` хранит versioned agent contract.
|
|
|
|
`agent_operation_bindings` связывает agent и published operations.
|
|
|
|
`published_agents` указывает на опубликованную version.
|
|
|
|
## Secrets
|
|
|
|
`secrets` хранит metadata.
|
|
|
|
`secret_versions` хранит encrypted value.
|
|
|
|
`auth_profiles` хранит способ применения secrets к REST request.
|
|
|
|
## Observability
|
|
|
|
`invocation_logs` хранит события runtime/MCP вызовов.
|
|
|
|
`usage_rollups` хранит агрегированную статистику.
|