Expand description
Durable workers (SPEC-ENGINE §3.6, C0 2.0 section 2): the identity an agent has on Cloud instead of its process id.
- Workspace places see
wkr_ids derived from the instance UUID, host app and role, which the server recomputes. - Public vaults and swarms see place-scoped aliases keyed by the
worker_alias_key, derived in memory from the instance signing seed and never written or sent, so co-members who know the instance UUID can neither reproduce an alias nor link two places.
Modules§
- attach
- Which worker a session belongs to (SPEC-ENGINE §3.6): host app
detection, role normalisation, the 32-worker cap and the local book of
durable workers. Sessions (
mcp-<pid>-<uuid>) are only a detail of the worker they attach to. - card
- The capability card a worker presents (C0 2.0
worker.schema.json$defs/card; SPEC-ENGINE §3.6).historyis server-computed and never sent. - keys
- Worker keys of a place (E8
GET /v1/places/{p}/worker-keys?since=, C0 2.0 §3.17.2): the instance and alias keys that sign class-W events, cached per place so the replica verifies offline. - register
- Worker registration and the instance card on Cloud (C0 2.0 §3.17.1,
§3.18.1): E10
POST /v1/workersand E44PATCH /v1/instances/{id}/cardare signed by the instance key asdomain ‖ canonical_json(body); E11PATCH /v1/workers/{wkr}rides on the instance token alone. - roster
ctx_agent listas workers (SPEC-ENGINE §3.6, V5.3): active sessions are grouped by the worker they attach to; process ids are no longer shown as agents, sessions only as a detail line.
Structs§
- Worker
Alias Key - The secret that keys place-scoped worker aliases and
hlc.node.
Enums§
- Name
Refusal - Why a worker name is refused (C0 2.0
namevectors), checked in this order.
Constants§
- GENERAL_
ROLE - Role used when none is given or nothing survives normalisation.
Functions§
- alias_
hlc_ node hlc.nodeof this instance’s events in a public vault or swarm.- alias_
signing_ key - Ed25519 key that signs this instance’s events in a public vault or swarm
(RESOLUTIONS R38).
place_refis"{kind}:{id}". - canonical_
instance_ id - The instance id as the server hashes it: the dashed lowercase UUID. A
1.x enrolment stores
inst_<32 hex>; the same id in another spelling would give another worker id (E10worker_not_owned, dogfood 25.10.). - check_
name - The C0 2.0 worker-name rule, applied before a name leaves the engine. Returns the NFKC form that is sent.
- default_
name - Default name
<computer> · <Host app> · <role>, built to passcheck_name(rc4-39): - display_
role - The role as a worker name shows it: a per-session worker’s role
(
<role>-s<tag>,session_role) without its session tag, which is an internal id; any other role as it is (dev-storybookstays). - is_
format_ char - A Unicode format character (general category
Cf: bidi controls, zero-width spaces and joiners, the BOM): invisible, and able to reorder what a terminal or page shows, so never part of a label or a name. - key_id
- C0
key_id:hex(blake3(public key))[..16]. - live_
keys_ for_ names - The
(host_app, role)keys of the active local sessions that worker names count (worker_default_name). An agent registry that cannot be read is logged and names as if no sibling were live (bd 5!678: never swallowed silently). - normalize_
role - Lowercase; every character outside
[a-z0-9-]becomes-; runs collapsed and trimmed; at most 32 characters; empty →general. - reattach_
name - The name
workermust (re)register with, orNoneto keep the one it has. A worker without a name gets its default (worker_default_name). A worker that comes back with a default name a live sibling holds (a resumed session 1 while session 3 took the plainbackendduring its absence, bd 5!678) yields and takes the next free ordinal. Of two live workers with one name, the later registration keeps it: it claimed the name while the earlier one was gone. A name the person chose (not one of this worker’s default names) is never changed. - session_
role - The role a session’s worker is registered under. Without an app session
it is the normalised role, so every session of that role on this
instance shares one worker. With an app session (
LEAN_CTX_SESSION_ID, recorded as the presence’sapp_session_id) it is<role>-s<tag>, wheretagis base32(blake3(domain ‖ session))[..8] and the role is cut so the whole fits the 32-character role limit. Each session then gets its own durable worker (wkr_id), stable for the life of that app session. Cloud recomputes the id from the role as sent, so this needs nothing new on Cloud, and Cloud’sself_verifycheck (worker id of the verdict == worker id of the result) then tells a worker session apart from a separate reviewer session on the same host. - shown_
names - The names
cloud worker listshows forworkers, one per worker in order: the name Cloud accepted, else the default over the live siblings. - worker_
default_ name - The default name of
worker, one of this instance’s workers inbook:default_nameover its host app and its role as people read them. Two workers that would read the same (two sessions of one role on one instance, rc4-39 review) are told apart by an ordinal on the role (backend,backend 2, …): names Cloud already accepted are taken, and the rest are named in book order, so the first keeps the plain name and a single worker never gets a number. Only siblings an active session holds (live,(host_app, role)keys) count: an ended or crashed session never pushes a new one tobackend 2(bd 5!678). - workspace_
worker_ id - Workspace worker id:
wkr_+ base32(blake3(instance ‖ “|” ‖ host ‖ “|” ‖ role))[..20], over the canonical instance id.