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
subject | only the selves belonging to this user of yours |
kind | only 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
kind | what 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 |
character | optional {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 |
procedure | optional: how it works at birth |
handle | lowercase id |
name | what people call it |
charter | {purpose, answersTo?, authority?: {reach?: source ids}, reviewBy?} |
persona | {default?, surfaces?} |
interests | string[] |
routine | {mode?: scheduled|on-activity, read?, reflect?, reflectAfter?, maxCalls?, maxTokens?} |
identity | [{kind, key, value}] |
seed | {story?, lessons?: [{claim, appliesWhen?, surfaces?}]} |
subject | the user of yours it belongs to |
program | its own instructions per step, after the tenant's |
orient | false to skip orientation (bulk births) |
status | active|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
kind | what 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 | |
handle | a new handle; the self keeps its whole life |
charter | |
persona | |
routine | |
interests | |
program | |
status | active|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
text | how this self should do the work |
why | optional reason |
POST/selves/:handle/procedure/revertadmin
Go back to an earlier procedure.
Body
version | which version |
why | optional 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
axis | the stance |
truth | where the outcome sits, -1..1 |
outcome | what settled it |
weight | optional 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
name | the 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
kind | value|trait|commitment|taste|voice|expertise|relationship |
key | |
value | null 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
surface | where it is being asked |
task | what it is being asked |
item | the item this work is on, in your own terms; a trial pairs on it (default: the ticket) |
taskClass | the kind of task; faults are kept per class (default: default) |
interactive | false for background calls |
person | your own identifier for the person this turn is for; the self is told what they have said is true of them |
personLabel | a name for that person, stored once |
personScope | your word for the part of your product this call is in |
personProject | your project id, when the call is inside one |
POST/selves/:handle/runadmin
Queue a routine step now.
Body
job | orient|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_run | true (default) | false |
confirm | the handle, for a real erasure |
blank_worlds | true 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
reason | why (required, kept in the record) |
seq | the episode's sequence number |
ref | its source reference (refs.ref) |
text | its brief, exactly |
type | narrow 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
reason | why (required) |
seq | the episode's sequence number |
ref | its source reference (refs.ref) |
text | its 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
after | the last seq you hold (default: from the start) |
limit | up to 1000 (default 200) |
type | only 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
type | your own lowercase name, e.g. session.kept |
brief | what happened |
thought | optional |
refs | optional object |
surface | optional |
importance | 0..1 |
idempotency_key | optional (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
limit | 1..100, default 20 |
after | the next_cursor of the last page |
surface | only 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
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] |
effects | read (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
by | kind (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
date | YYYY-MM-DD |
place | optional |
stops | [{at: HH:MM, title, text, place?, images?: [https]}], in the order of the day, at most 24 |
conditions | optional text, for example from GET /places/conditions |
record | true to keep the day as an episode |
estimate_only | true for the cost only |