MiCyte

← The wiki

Director

BuiltRendered from 46d-director.md in the public repository. Edits belong there.

Director is the hosting instance's application for managing the instances it has established and the registrar's profiles of entities.

Packagedirector, version 1.0.0
KindApp. Hub tool director, a declared hub with two configurations
MarketplaceListed under Enchir (descends_from)
ForAn instance that hosts other instances and acts as their registrar
RequiresA legal_entity document (archetype legal_entity_profile)
Own sandboxNone
PortsNone
PreviewNone

What it turns on

Installing exposes four tools: director, profile_admin_edit, farm_onboarding and entity_profile_table. The hub opens in one of two configurations, chosen with the director_app query parameter. Each draws a Domain tab last.

Instances (default):

TabContent
InstancesEvery instance the store holds (micyte.core.instances.list_portal_instances), the host's own first. Opening a row shows that instance's own msn_profile document.
Establishfarm_onboarding: collects a farm's name, sandbox token, registrar msn node and optional parcels, and creates a new sandbox from the farm template
ChannelDrawn when a registered channel names ("director", "instances") as its governor (91). It previews that channel as a chosen member sees it, in a window that cannot act. This repository ships no such channel; a host registers its own
DomainThe local domain of the sandbox the shell has selected

Registrar:

TabContent
Directoryprofile_admin_edit: the registrar's card index, including entities that hold no instance. Filterable by region and by profile type
Profile typesprofile_admin_edit, opened on its types view: each entity kind and subtype, the document and archetype its profiles use, and counts of cards and profiles
Networkentity_profile_table: entity profiles grouped by class, filterable. Read-only. Its five classes are the map's colour groups, not the profile types
DomainThe registrar sandbox's local domain

Contact cards, profiles and types

The registrar keeps two kinds of row about an entity.

  • Contact card. One row per msn in the registry document, written to the msn_contact_card archetype: msn_id, lcl_id (the type), dns, website, email. A node that runs an instance also carries its public_signature and instance_endpoint. The card is what the network publishes. Its type is the entity's kind.
  • Profile. One row in the document the entity's kind keeps, written to that document's archetype:
KindDocumentArchetype
legal, informallegal_entitylegal_entity_profile
naturalnatural_entitynatural_entity_profile
administrativeadministrative_entityadministrative_entity_profile

Each document names its archetype in its metadata (document_metadata["archetype"]), the convention every other corpus document follows. The pairing above is also declared in code (directory.PROFILE_DOCUMENTS); the types view says when a document's metadata names a different archetype from that pairing, or names none.

The types are the children of the node labelled entity_class in the registrar's lcl_domain (the kinds), and their children (the subtypes, such as llc under legal). The node is found by its label. If no node, or more than one, carries that label, there are no types and none is offered.

Standard fields

A profile row carries every one of its document's standard fields, in this order, with an empty value when the fact is unknown:

DocumentStandard fields
legal_entitymsn_id, title, lcl_id, dns, email, nominal (the phone)
natural_entitymsn_id, the name parts (ruiqi_id, repeated: first, then last), email, sosvid when known, nominal

A row's family is its pair count, so a row whose cells came and went with what was known changed address with every edit. With every cell present, a fact learned later is an edit in place. Director's save writes a legal_entity row in this shape. A row written before it takes the missing cells, empty, on its first save, keeps every cell it held, and moves once to the family six pairs name.

The contact card follows a different convention. Its cells are written in the card's order (msn_id, lcl_id, dns, email, website, then public_signature and instance_endpoint), and an empty cell is left out, because a declaration that merges into the card drops empty values.

Ag profile types

A network profile (the AGNET channel's) is typed by a node of the registrar's ag_profile branch, also found by its label:

TypeIts children
producercrop, orchard, pasture, farmstand, apiary, vineyard, micro_farm
hubfarmers_market_host, csa_operator, food_hub
consumergrocery_store
seed_supplier, organization, administrative_sponsornone

The type select lists that branch as the tree holds it, each option labelled by its path ("Hub — farmers market host"). A type is checked against the branch when a profile is created or saved, and anything else is refused. A type written in the numbering used before 2026-09-09 (1-2-*) is translated to the node that carries the same label.

Readers classify a type by its LABEL PATH, never by its address. The 2026-11-11 regroup moved farmers_market_host, csa_operator and food_hub under hub and added consumer, so an address names a different type than it did before, while a label does not change.

An administrative profile records jurisdiction_type (city, village, township, county), not a type. Its type is derived from that value by one declared crosswalk, directory.ADMIN_SUBTYPE_OF_JURISDICTION:

jurisdiction_typeType
city, villagemunicipal_government
townshiptownship_government
countycounty_government

The stored value is not changed: it is the finer fact, and the type is read from it. A value the crosswalk does not map gives no type, and the detail and the types view say which value it was. On the types view each administrative subtype says which jurisdiction values it was counted from.

Opening an entity in the Directory shows three parts:

  1. Contact card. dns, email and website can be edited. The type is shown and is not editable here.
  2. Profile, titled by its document's archetype. On a legal_entity row the type is a select grouped by kind: the row's kind and its subtypes first, then the other kinds the same document keeps (a legal entity is offered informal and its subtypes), and dns, email and the phone can be edited. On an administrative_entity row the type is shown read-only, with the jurisdiction_type it was derived from, and dns can be edited.
  3. Also on record. Rows from every other registrar document that name the entity. Read-only, folded by default.

Above the parts, the detail lists where the card and the profile disagree: no card, no profile, a card with no type, a profile in a document that does not keep the card's kind, a profile type of a different kind from the card's, two profile rows for one msn, or dns values that differ. Nothing is corrected automatically.

Two rows are not defects and are not counted as such. A document's own title row (a lone title at 4-1-1, the text_note convention) is not a contact card. An msn whose segments after the state are all 0 is a placeholder: a place with no county, street or house. Rows filed under it are separate entities with no address yet; the detail says so, and that each needs an address to be given an msn of its own.

A type change is checked by value in save_profile_entry. The new type must be the row's current kind, one of its subtypes, or another kind the same document keeps. Choosing another kind (legal to informal) moves the entity: the profile's type and the contact card's type are written in one transaction, so the two never disagree. The page says so before it saves, and the move is made on the second press of Save. A kind kept in another document (legal to natural) is refused with the reason: that document's archetype has fields the row does not have. A field already on the row is replaced where it stands, so the row keeps its archetype's field order.

The same detail is drawn on a visited profile in the walkthrough, for a different audience: no forms, the card's lcl_id, dns and website only (never its email), no natural person's profile row, and no other documents.

Not done here: moving an entity to a kind kept in another document, and giving a placeholder msn's entities their own addresses.

What it reads and writes

Tool or paneWrites
Instances paneAn instance's own profile fields title, dns, email, website, posted to /portal/api/v2/director/client_profile/<msn>
profile_admin_editsave_profile_entry, which writes a legal_entity row in its standard fields (a kind move also writes the contact card's lcl_id, in the same transaction), create_event, save_event, delete_event
farm_onboardingcreate_farm

It reads the registrar's legal_entity document, each instance's msn_profile, and the network map payload that entity_profile_table groups.

Status

Built and published. No demo.

Source