bus-entities — juridical entity registry

bus-entities — juridical entity registry

Synopsis

bus entities init [-C <dir>] [global flags]
bus entities list [-C <dir>] [-o <file>] [-f <format>] [global flags]
bus entities add --entity-type <organization|person> --display-name <name> [flags]

Description

bus entities owns the canonical juridical entity registry for a workspace. The dataset lives in entities.csv with a beside-the-table schema entities.schema.json at the workspace root.

Organization rows use official identifiers. --business-id and --org-id feed the canonical entity_id format, so a Finnish business ID becomes fi:business-id:<value> and an org or association ID becomes fi:org-id:<value>. If both identifiers are present on one row, the canonical entity_id is still derived from business_id and the org_id is stored on the same entity.

Person rows are also supported, but until a dedicated person-identifier field exists they require an explicit prefixed --entity-id.

Commands

init creates the entity dataset and schema when they are missing. list validates the dataset and prints entity_id, entity_type, and display_name as TSV. add appends one validated entity row.

The public Go integration surface is split into three small packages. paths exposes the workspace-relative file locations, bootstrap ensures the entity registry exists, and registry provides validated read-only lookup access for dependent modules such as bus-customers and bus-vendors.

Examples

bus entities init
bus entities add --entity-type organization --business-id 1234567-8 --display-name "Aurora Oy" --org-id ry-100
bus entities add --entity-type organization --org-id vero-fi --display-name "Vero Finland"
bus entities add --entity-type person --entity-id fi:person:matti-001 --display-name "Matti Meikalainen"
bus entities list --format tsv