Plan: add createOrganization and filesystem resources

This commit is contained in:
nav
2026-03-07 15:39:23 +00:00
parent 40d19ee811
commit 5f9a140fdc

View File

@@ -13,6 +13,11 @@ Build an OpenClaw plugin that models organization hierarchy and agent identities
## 3) Storage Strategy ## 3) Storage Strategy
- **Structure & identity data**: in-memory + JSON persistence (no memory_store) - **Structure & identity data**: in-memory + JSON persistence (no memory_store)
- **Shared memory**: memory_store keyed by scope (`org:{id}`, `dept:{id}`, `team:{id}`) - **Shared memory**: memory_store keyed by scope (`org:{id}`, `dept:{id}`, `team:{id}`)
- **Filesystem resources** (plugin install dir `~/.openclaw/yonexus`):
- `yonexus/organizations/<org-name>/` contains: `teams/`, `docs/`, `notes/`, `knowledge/`, `rules/`
- On **create_organization**: create `<org-name>` folder and its subfolders
- On **create_team**: create `organizations/<org-name>/teams/<team-name>/` with `agents/`, `docs/`, `notes/`, `knowledge/`, `rules/`
- On **assign_identity**: create `organizations/<org-name>/teams/<team-name>/agents/<agent-id>/` with `docs/`, `notes/`, `knowledge/`, `rules/`
## 4) Permissions Model (B) ## 4) Permissions Model (B)
Roles: Roles:
@@ -46,11 +51,12 @@ Permission matrix (recommended):
``` ```
## 6) Tool/API Surface (MVP) ## 6) Tool/API Surface (MVP)
- `create_organization(name)`
- `create_department(name, orgId)` - `create_department(name, orgId)`
- `create_team(name, deptId)` - `create_team(name, deptId)`
- `register_agent(agentId, name)` - `register_agent(agentId, name)`
- `assign_identity(agentId, deptId, teamId, meta)` - `assign_identity(agentId, deptId, teamId, meta)`
- `set_supervisor(agentId, supervisorId)` - `set_supervisor(actor, agentId, supervisorId)`
- `whoami(agentId)` → identities + supervisor + roles - `whoami(agentId)` → identities + supervisor + roles
- `query_agents(filters, options)` → list; supports `eq | contains | regex` - `query_agents(filters, options)` → list; supports `eq | contains | regex`