Skip to content
mercury framework
GitHub

Static directory

Package
@mercury-fw/directory-static
Role
Directory
Version
0.1.2
Terminal window
bun add @mercury-fw/directory-static
VariableWhat it is
DIRECTORY_STATIC_PEOPLERequired. the people, as JSON: [{"id": "alice", "roles": ["mercury.act-as-self"], "identities": ["static:alice"]}]

A directory kept by hand, for a small team whose admin maintains the list.

mercury.config.ts
import { staticDirectory } from "@mercury-fw/directory-static";
directory: staticDirectory,
.env
DIRECTORY_STATIC_PEOPLE=[{"id": "alice", "displayName": "Alice", "roles": ["mercury.act-as-self"], "identities": ["static:alice", "google-chat:users/123"]}]

Each person has an id (a short lowercase name), optionally a displayName, an email and roles, and the identities the channels know them by. Listing two identities makes them one person: one memory, one private area, the same roles. An identity belongs to one person only.

A missing or malformed list lets nobody in but the terminal: a broken configuration closes the agent, it never opens it.