acquaint.edit#
Changing the store: create an entity, append an observation, rename with relinking, forget with a tombstone.
The hot path is append-only. append_observation() never edits an entry file, a
writing card or a rule: it appends a dated, sourced entry to log/YYYY-MM.md (or a
handle to identities.yaml). The one change it makes to an existing entry is making an
inactive handle active again, and only when asked (reactivate). identities.yaml is
rewritten whenever it changes, so comments in it are not kept. Turning observations into
profile lines is a separate, reviewed pass.
These functions take exact references (ada-lovelace, person:ada-lovelace,
people/ada-lovelace); matching names to ids is the caller’s job
(acquaint.lookup.find_entity()), so nothing here acts on a guess.
Module Attributes
What |
Functions
|
Append one dated, sourced entry to the entity's |
|
Remove an entity's whole folder, hidden files included, after writing a salted tombstone. |
|
Scaffold |
|
Give an entity a new id ( |
|
Why |
|
The tombstone matching any of these identifiers, if such an entity was forgotten. |
- acquaint.edit.OBSERVATION_KINDS = ('observation', 'interaction', 'identity', 'preference', 'view', 'rule')#
What
remembercan record. The last three need a source at write time.
- acquaint.edit.append_observation(store, ref, text, *, source=None, kind='observation', reactivate=False, disclosed=(), today=None)[source]#
Append one dated, sourced entry to the entity’s
log/YYYY-MM.md(and, foridentity, toidentities.yaml).An identity equal to an inactive one is refused, naming that entry, unless
reactivateis set (see_append_identity()).disclosed(interactiononly) lists the records the message identified, by exact id or reference, written as references (project:heron); never the text. A refusal writes nothing.
- acquaint.edit.forget_entity(store, ref, *, confirm=False, today=None)[source]#
Remove an entity’s whole folder, hidden files included, after writing a salted tombstone.
Without
confirmit only reports what it would remove, and which other records still mention the entity (it does not edit them: other people’s logs are append-only). The tombstone is written first, so a removal that fails half way still stops the entity being re-created, and runningforgetagain finishes the job.
- acquaint.edit.new_entity(store, kind, name, *, qualifier=None, description=None, force=False, today=None)[source]#
Scaffold
<kind dir>/<slug>/PROFILE.mdfrom the template for its kind, and seedPOLICY.md.
- acquaint.edit.rename_entity(store, ref, to, *, today=None)[source]#
Give an entity a new id (
tois a slug) or a new name and id (tois a name); links elsewhere follow.