GET/selvesmember

The tenant's selves with counts of what they hold. A key scoped to one subject lists that subject's selves only (added in contract version 1, additive).

Query

subjectonly the selves belonging to this user of yours
kindonly selves of this kind (self, person, place, thing, or one of the tenant's identityKinds); added in contract version 1, additive
POST/selvesadmin

Give birth to a self. Fails if the handle exists.

Body

kindwhat the self stands for: self (default), person, place, thing, or one of the tenant's identityKinds; listed and counted apart (GET /selves?kind=, GET /selves/aggregate); added in contract version 1, additive
characteroptional {personality: Big Five 0..1 | genome: {effectsSeed, seed}, axes?: {stance: -1..1}, tastes?: {taste: -1..1}, bands?: {trait: 0..1, how far it may sit from the set point}, pinned?: [taste or stance names held where they are set]}: who it is beneath its charter; bands and pinned are a role's limits, kept whatever it lives through
procedureoptional: how it works at birth
handlelowercase id
namewhat people call it
charter{purpose, answersTo?, authority?: {reach?: source ids}, reviewBy?}
persona{default?, surfaces?}
interestsstring[]
routine{mode?: scheduled|on-activity, read?, reflect?, reflectAfter?, maxCalls?, maxTokens?}
identity[{kind, key, value}]
seed{story?, lessons?: [{claim, appliesWhen?, surfaces?}]}
subjectthe user of yours it belongs to
programits own instructions per step, after the tenant's
orientfalse to skip orientation (bulk births)
statusactive|paused
PUT/selves/:handleadmin

Declare a self: born if absent; otherwise what a person sets (name, charter, persona, routine, interests) is brought in line. Identity and history are never overwritten.

Body

kindwhat the self stands for: self (default), person, place, thing, or one of the tenant's identityKinds; listed and counted apart (GET /selves?kind=, GET /selves/aggregate); added in contract version 1, additive
...as POST /selves, without handle
GET/selves/:handlemember

A self in full: identity, lessons as the core holds them, its procedure and trials, the faults it carries, what is true now, recent episodes, proposals, usage, jobs, outcomes, record integrity, and life: the persona linked to it, the newest world it lives in and its member there (null when it lives in none).

PATCH/selves/:handleadmin

Change what a person sets. status is active, paused or retired: retired is terminal (added in contract version 1, additive): the self keeps its record and reads as before, every write to it is refused with 409, no routine or work runs for it, and nothing brings it back; erase it with POST /selves/:handle/erasure.

Body

name
handlea new handle; the self keeps its whole life
charter
persona
routine
interests
program
statusactive|paused
GET/selves/:handle/proceduremember

How this self does the work: the adopted text, every candidate on trial with the gate's reading of it, and every version with the diff and the items that decided it.

PUT/selves/:handle/procedureadmin

Write the procedure yourself. Ends any trial; recorded as authority, never as evidence.

Body

texthow this self should do the work
whyoptional reason
POST/selves/:handle/procedure/revertadmin

Go back to an earlier procedure.

Body

versionwhich version
whyoptional reason
POST/selves/:handle/intakemember

What a self with a character takes in: news, posts, conversations, literature, media, experiences, meals, purchases. Moves its stances, tastes, temperament, affect and capacities as its personality lets it; never how it works.

Body

items[{kind, source, stance?: {axis: -1..1}, intensity?: 0..1, arousal?: 0..1, valence?: -1..1, demand?: 0..1, taste?: {name: -1..1}, body?: {nutrition?, rest?, strain?}}]
POST/selves/:handle/settlemember

The world settled something a stance bears on: the stance is pulled toward it and sources that pushed the other way lose trust. Grounding, kept apart from drift.

Body

axisthe stance
truthwhere the outcome sits, -1..1
outcomewhat settled it
weightoptional 0..2
POST/selves/:handle/character/eventadmin

A life event moves temperament directly, scaled by the self's sensitivity; part of it fades back toward its set point.

Body

namethe event
delta{openness?, conscientiousness?, extraversion?, agreeableness?, neuroticism?}, each within ±0.3
POST/selves/:handle/identityadmin

A person sets or removes one identity row directly.

Body

kindvalue|trait|commitment|taste|voice|expertise|relationship
key
valuenull removes
POST/selves/:handle/contextmember

The self's context for one call on one surface, and a ticket for its work and outcome. The answer also carries `parts` (added in contract version 1, additive; the preamble string is unchanged): { identity, life, procedure, lessons, reading, person, notice } as separate strings, each null when that part is not in the preamble.

Body

surfacewhere it is being asked
taskwhat it is being asked
itemthe item this work is on, in your own terms; a trial pairs on it (default: the ticket)
taskClassthe kind of task; faults are kept per class (default: default)
interactivefalse for background calls
personyour own identifier for the person this turn is for; the self is told what they have said is true of them
personLabela name for that person, stored once
personScopeyour word for the part of your product this call is in
personProjectyour project id, when the call is inside one
POST/selves/:handle/runadmin

Queue a routine step now.

Body

joborient|read|reflect|dream|battery|maintain|fetch
GET/selves/:handle/exportmember

Identity, lessons and the whole hash-chained record, without authority.

POST/selves/:handle/erasureadmin

Erase one self of this tenant and its whole record, for good. Dry run by default: it returns what would go (rows per table, the record's length and head hash) and writes nothing. A real erasure needs dry_run false and confirm equal to the handle; it removes the self, its identity, record, lessons, tickets, proposals, jobs, usage, work, residence, passages, the events that name it, the runs it made with their steps and the personas linked to it, and writes a receipt (counts and hashes, the handle only as a hash) into the tenant's erasure chain. A member key is refused; another tenant's self is never found. Added in contract version 1, additive.

Body

dry_runtrue (default) | false
confirmthe handle, for a real erasure
blank_worldstrue to clear the words and memories of the self's linked personas from the worlds they lived in, in the same erasure; the dry run lists those worlds as worlds_holding_words (added in contract version 1, additive)
POST/selves/:handle/memory/retractmember

Retract something in a self's OWN memory that was recorded wrongly (an episode a product sent, a fact or a note). Name it by seq, by ref (the source reference sent as refs.ref) or by text (its brief, exactly), and say why. The record is a hash chain and is never edited: the episode is left out of reading (archived) and a new entry in the chain says what was retracted, why and by whom. Retracting what is already retracted writes a second entry and reports it under already. The birth episode cannot be retracted. A lesson drawn from an episode is doubted through POST /lessons/:id/contest. Added in contract version 1, additive.

Body

reasonwhy (required, kept in the record)
seqthe episode's sequence number
refits source reference (refs.ref)
textits brief, exactly
typenarrow to this episode type
POST/selves/:handle/memory/supersedemember

Replace something in a self's own memory: the same as retract, and a new episode in its place that names what it supersedes (refs.supersedes) and the retraction entry (refs.retraction). The replacement has the type of what it replaces unless it gives one. Added in contract version 1, additive.

Body

reasonwhy (required)
seqthe episode's sequence number
refits source reference (refs.ref)
textits brief, exactly
replacement{ brief, type?, thought?, importance?, refs? }
GET/selves/:handle/recordmember

The self's record, in order, a page at a time: every episode and decision as a hash-chained entry.

Query

afterthe last seq you hold (default: from the start)
limitup to 1000 (default 200)
typeonly entries of this type or its family, e.g. practice or belief.moved
POST/selves/:handle/episodesmember

Record something that happened to a self in your product, in your own type (a session kept, a lived day, a sale). It reflects on it like anything else.

Body

typeyour own lowercase name, e.g. session.kept
briefwhat happened
thoughtoptional
refsoptional object
surfaceoptional
importance0..1
idempotency_keyoptional (or the Idempotency-Key header): the same key for the same self records nothing the second time and answers the first call's seq with replayed true; the same key with a different episode is 409 (added in contract version 1, additive)
GET/selves/:handle/recommendationsmember

A self's past recommendations (its tickets), newest first, each with its work, what it cited, and every outcome with its time, a verdict (signal) or what the world did (happened). A page at a time.

Query

limit1..100, default 20
afterthe next_cursor of the last page
surfaceonly tickets of this surface
POST/selves/:handle/traveladmin

Move a self into a world: its first arrival, or a crossing. Its record goes with it untouched, a running trial stays behind, and the destination kind's quarantine applies. Refused if its gate is looser than the laws.

Body

tothe world's id
GET/selves/:handle/passagesmember

Where a self lives, every border it crossed, and whether its record shows it arrived whole each time.

PUT/selves/:handle/toolsadmin

Which tenant tools a self may call during work (its charter's authority.tools) and whether it may use tools with effects.

Body

tools[tool names; a trailing * matches a prefix; [] none]
effectsread (default) | act
GET/selves/aggregatemember

Counts of the tenant's selves by kind or status, or of their episodes by type, with groups of fewer than five selves folded into other. The one kind of route an aggregate key may read besides persona aggregates. Added in contract version 1, additive.

Query

bykind (default) | status | episode_type
POST/selves/:handle/daysmember

Live one planned day ahead as this self: the stops met in order by one life that carries what happened earlier (energy, feeling, earlier moments) into what comes later; a moment per stop {at, title, text, feel -1..1, energy 0..1} and a summary. estimate_only returns the cost (model calls) and runs nothing; record true keeps the day as one episode (origin rehearsal) on the self. The project's content policy applies. Added in contract version 1, additive.

Body

dateYYYY-MM-DD
placeoptional
stops[{at: HH:MM, title, text, place?, images?: [https]}], in the order of the day, at most 24
conditionsoptional text, for example from GET /places/conditions
recordtrue to keep the day as an episode
estimate_onlytrue for the cost only
A glass tree whose crown holds many small worlds like fruit

Which world will you live in?

What grows here is meant to reach the real world. Start with a world of your own.