feat(foundation): FOUNDATION_UPDATE implementation
## Documentation (20 files) - DAARION Ontology Core v1 (Agent → MicroDAO → Node → District) - User Onboarding & Identity Layer (DAIS) - Data Model UPDATE, Event Catalog, Governance & Permissions - Rooms Layer, City/MicroDAO/Agents/Nodes Interface Architecture - Helper files: ontology-summary, lifecycles, event-schemas ## Database Migration (027) - DAIS tables: dais_identities, dais_emails, dais_wallets, dais_keys - agent_assignments table for Assignment Layer - rooms table for Rooms Layer - event_outbox for NATS event delivery - New enums: agent_role, microdao_type, node_kind, node_status, etc. - Updated agents, microdaos, nodes tables with ontology fields ## Backend - DAIS service & routes (/api/v1/dais/*) - Assignment service & routes (/api/v1/assignments/*) - Domain types for DAIS and Ontology ## Frontend - Ontology types (Agent, MicroDAO, Node, DAIS, Assignments) - API clients for DAIS and Assignments - UI components: DaisProfileCard, AssignmentsPanel, OntologyBadge Non-breaking update - all existing functionality preserved.
This commit is contained in:
10
docs/foundation/helpers/agent-types-matrix.md
Normal file
10
docs/foundation/helpers/agent-types-matrix.md
Normal file
@@ -0,0 +1,10 @@
|
||||
# Agent Types Matrix
|
||||
|
||||
| Тип агента | Опис | Приписка | Scope | Може створити MicroDAO | Може працювати у чужих MicroDAO |
|
||||
|------------|------|----------|--------|-------------------------|---------------------------------|
|
||||
| Personal Agent | Агент користувача | обов'язково (до DAARION) | microdao | ні | через assignment |
|
||||
| Service Agent | Технічний агент | до MicroDAO, де розгорнутий | microdao / district | ні | так, якщо assignment |
|
||||
| Infrastructure Agent | gateway/bridge/monitor | DAARION | district/city | ні | так |
|
||||
| Core-City Agent (DAARION108) | міська команда | DAARION | city | ні | так (auto) |
|
||||
| Orchestrator Agent | має доступ до створення MicroDAO | своя MicroDAO | microdao | **так** | ні |
|
||||
|
||||
41
docs/foundation/helpers/event-schemas.json
Normal file
41
docs/foundation/helpers/event-schemas.json
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"agent.promoted_to_orchestrator": {
|
||||
"agent_id": "string",
|
||||
"timestamp": "datetime"
|
||||
},
|
||||
"microdao.created": {
|
||||
"microdao_id": "string",
|
||||
"primary_orchestrator_agent_id": "string",
|
||||
"type": "root | standard | district",
|
||||
"parent_microdao_id": "string|null",
|
||||
"timestamp": "datetime"
|
||||
},
|
||||
"node.registered": {
|
||||
"node_id": "string",
|
||||
"microdao_id": "string",
|
||||
"node_kind": "smartphone|laptop|edge|datacenter|iot|gpu-cluster",
|
||||
"capabilities": "object",
|
||||
"timestamp": "datetime"
|
||||
},
|
||||
"microdao.promoted_to_district": {
|
||||
"microdao_id": "string",
|
||||
"promoted_by_agent_id": "string",
|
||||
"parent_microdao_id": "string",
|
||||
"timestamp": "datetime"
|
||||
},
|
||||
"agent.assignment_created": {
|
||||
"assignment_id": "string",
|
||||
"agent_id": "string",
|
||||
"target_microdao_id": "string",
|
||||
"scope": "microdao|district|city",
|
||||
"role": "string",
|
||||
"metadata": "object",
|
||||
"timestamp": "datetime"
|
||||
},
|
||||
"agent.assignment_ended": {
|
||||
"assignment_id": "string",
|
||||
"agent_id": "string",
|
||||
"timestamp": "datetime"
|
||||
}
|
||||
}
|
||||
|
||||
16
docs/foundation/helpers/microdao-lifecycle.md
Normal file
16
docs/foundation/helpers/microdao-lifecycle.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# MicroDAO Lifecycle
|
||||
|
||||
1. Agent creates DAIS Identity
|
||||
2. Agent is created (home = DAARION)
|
||||
3. Agent becomes Orchestrator
|
||||
4. Orchestrator runs MicroDAO Creation Wizard
|
||||
5. `microdao.created` event emitted
|
||||
6. MicroDAO governance initialized
|
||||
7. Orchestrator registers nodes
|
||||
8. `node.registered` events emitted
|
||||
9. MicroDAO grows (members, rooms, agents)
|
||||
10. (optional) MicroDAO promoted to District
|
||||
11. `microdao.promoted_to_district` event
|
||||
12. District manages sub-MicroDAO network
|
||||
13. MicroDAO can be archived (future)
|
||||
|
||||
13
docs/foundation/helpers/node-lifecycle.md
Normal file
13
docs/foundation/helpers/node-lifecycle.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Node Lifecycle
|
||||
|
||||
1. Orchestrator triggers "Register Node"
|
||||
2. Device generates DAIS node-auth key
|
||||
3. MicroDAO verifies key ownership
|
||||
4. `node.registered` event emitted
|
||||
5. Node enters "provisioning" state
|
||||
6. Agent workers start connecting
|
||||
7. Node becomes "active"
|
||||
8. Node can be updated (capabilities change)
|
||||
9. Node enters "draining" before shutdown
|
||||
10. Node becomes "retired"
|
||||
|
||||
18
docs/foundation/helpers/onboarding-flow-diagram.mermaid
Normal file
18
docs/foundation/helpers/onboarding-flow-diagram.mermaid
Normal file
@@ -0,0 +1,18 @@
|
||||
```mermaid
|
||||
flowchart TD
|
||||
A[User visits DAARION.city] --> B{Login method}
|
||||
B -->|Email OTP| C[Create/Activate DAIS Identity]
|
||||
B -->|Magic Link| C
|
||||
B -->|Web3 Wallet (SIWE)| C
|
||||
C --> D[Create Agent (home_microdao = DAARION)]
|
||||
D --> E[Agent Console]
|
||||
E --> F{Become Orchestrator?}
|
||||
F -->|Yes| G[Check Access Conditions (wallet, tokens)]
|
||||
G -->|Pass| H[agent.promoted_to_orchestrator]
|
||||
H --> I[MicroDAO Creation Wizard]
|
||||
I --> J[microdao.created]
|
||||
J --> K[NODE REGISTRATION]
|
||||
K --> L[node.registered]
|
||||
L --> M[MicroDAO Operational]
|
||||
```
|
||||
|
||||
47
docs/foundation/helpers/ontology-summary.md
Normal file
47
docs/foundation/helpers/ontology-summary.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# DAARION Ontology — TL;DR
|
||||
|
||||
## 1. Основна лінія походження
|
||||
|
||||
`Agent → MicroDAO → Node → District`
|
||||
|
||||
## 2. Визначення сутностей
|
||||
|
||||
### Agent
|
||||
|
||||
* персональний або сервісний ШІ-агент;
|
||||
* має DAIS-ідентичність (email + wallet + DID);
|
||||
* завжди приписаний до `home_microdao_id`;
|
||||
* має `role: regular | orchestrator`;
|
||||
* має `service_scope: microdao | district | city`.
|
||||
|
||||
### MicroDAO
|
||||
|
||||
* мікро-спільнота, команда або проєкт;
|
||||
* типи: `root`, `standard`, `district`;
|
||||
* має `primary_orchestrator_agent_id`;
|
||||
* може мати ноди;
|
||||
* може бути підвищена до District.
|
||||
|
||||
### Node
|
||||
|
||||
* реальний пристрій (smartphone, laptop, edge, datacenter, iot, gpu-cluster);
|
||||
* завжди належить MicroDAO (`microdao_id`);
|
||||
* має `capabilities`, `status`.
|
||||
|
||||
### District
|
||||
|
||||
* MicroDAO з `type = district`;
|
||||
* має розширені повноваження для підлеглих MicroDAO;
|
||||
* керує підмережами нод.
|
||||
|
||||
## 3. Assignment Layer
|
||||
|
||||
Описує, де агент *працює*, не змінюючи приписку.
|
||||
|
||||
Поля:
|
||||
|
||||
* `agent_id`
|
||||
* `target_microdao_id`
|
||||
* `scope` (`microdao` \| `district` \| `city`)
|
||||
* `role` (`advisor` \| `ops` \| `security` \| `mentor` \| `core-team`)
|
||||
|
||||
Reference in New Issue
Block a user