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.2
KindApp. Hub tool director, a declared hub with two configurations, to which a host may add its own
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 on its selector or with the director_app query parameter. Each draws a Domain tab last. An unknown value opens the first, Instances.

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

A host's own configurations. A host can add a configuration to the selector, so that it uses Director over a sandbox only that host keeps. A configuration a host adds names:

  • its families;
  • the sandbox its Domain tab shows;
  • the app whose channels its Channel tab draws (governs).

The selector lists the added configurations after the declared ones. A host can also give a declared configuration its own name. The id does not change, so bookmarks and a channel's governed_by keep working. Both are asked when the page is drawn, because a host registers after micyte loads. An addition may not take a declared configuration's id. An app that declares no configurations cannot be given one. See register_app_variant and relabel_app_variant in micyte/host.py.

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

Two optional cells may follow a legal_entity row's standard fields, in this order. They are written only when the fact is known, so a row that gains one changes family once:

FieldHolds
mailing_msnWhere the entity's mail goes when that is not where it legally is: the msn of a house (or something in one) that the registrar holds. Never the entity's own msn, and never a town
brand_colorThe brand's colours, up to ten, in order. Each is one colour, written as #rrggbb and stored as its 24 bits; see below
monogramThe letters the entity is shown by: one to three printable ASCII characters, kept in the case typed and stored as their 24 bits. A profile's face and the session in its head draw it; without one they draw the name's initials. Offered on the form only once the registrar's anchor types it

A colour is three base-256 digits. The anchor types brand_color by a baciloid labelled nominal-256-3 (three digits of the anchor's nominal-bacillete-256 radix), so one colour is one value among 16,777,216, held in 24 bits, red first. The color_hex lens shows it as #rrggbb and stores what a person types (#rrggbb, rrggbb or #rgb) as its bits; a viewscope draws it with the swatch primitive. Director's form takes the colours in one box, separated by commas, and refuses an eleventh colour or a value that is not one. Everything that reads the colours finds nominal-256-3 by its label (micyte/core/datum_ops/color_field.py), never by its address.

A monogram is three characters of the same radix. Its baciloid is labelled niu-baciloid-256-3, beside the colours' nominal-256-3: both are three digits of nominal-bacillete-256, and the label is what tells a reader to take them as characters rather than as one magnitude (micyte/core/datum_ops/monogram_field.py). Its value is the characters' 24 bits, eight each, padded on the right. Director's save refuses a monogram until the anchor holds monogram-babelette, so no row carries a cell its anchor cannot read; grounded_monogram_rows in the same module gives the two rows that add it, for a host's own grounding step to write.

The brand colours and the monogram belong to the registrar's legal entity profile. Everything that shows the entity elsewhere inherits them with its name and contact: an app's profile that keeps the entity's registrar block, and each member card a channel serves (micyte/channels/declared.py), whose lettered mark is the monogram on the first colour.

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