carbon6

Apps: instances, owned data and open reading — Design

Status: being built (2026-10-16); §18 records what is built and where it differs. It changes what docs/os.md §5 and docs/packages.md describe; §13 lists what it replaces. Where knowledge is kept, and what becomes of the memex, is in docs/knowledge.md.

1. The problem

Today an app is a realm (os.md §5): installing one creates a realm holding its code, its sessions and its data, and cross-realm API access uses grants. These API checks do not isolate agents or worker files (os.md §3.9). A realm decides three things at once:

  1. Which data its API requests address: one business's lists and queries shouldn't mix in another's.
  2. Who can change data, which is a question of consistency: only the CRM knows what makes a relationship valid.
  3. Where an app's code lives.

Tying the three together goes wrong for the apps we want:

  • A service (decks). A deck you make lands in the decks realm, out of your session list and away from your knowledge. Once made, it should be yours and need nothing more from decks.
  • A processor (CRM). It reads input (mail, business context), keeps working data of its own (summaries, scores), and publishes results (relationships) that add context to the input. In a realm of its own, its ordinary API reads need grants for the input, and the source realm's ordinary API reads don't include its results.
  • A mirror (Gmail). It keeps a copy of data whose source of truth is elsewhere, and must be the only writer of that copy. Today it's built into the memex rather than written as an app (docs/knowledge.md §6).
  • Many tenants. Running unrelated businesses, you want a CRM for each, each fed from one business's data, with separate results. Today each is a realm wired up with its own grants.
  • Silos. Every app realm hides its data by default. But nobody knows in advance which app's data will be useful to which agent; that's the point of the knowledge graph.

And app realms can be edited in Settings, so a deployed app drifts from the version installed, and upgrades need a three-way merge.

2. Principles

  • Realms organise; they don't isolate. Home, each business, anything you want grouped separately. Installing an app never creates one. Realm-scoped APIs do not make a realm a security boundary around an agent.
  • Reading is open within a realm. Every agent in a realm can read every collection in it, and every piece of data describes itself well enough for an agent written by anyone to use it.
  • Writing is owned. Data belongs to whoever keeps its consistency: an app instance, or the realm itself. Only the owner changes it, directly or through the operations it publishes.
  • The graph doesn't judge. Links between things are claims, each with an owner; anyone may add their own, and readers decide whose to believe (9).
  • Code is immutable. A package version never changes. An instance changes only by upgrading, downgrading or switching to a fork, and is configured through settings its package declares.

Unix works this way: /etc/passwd is readable by every program, and only passwd and chsh change it, because only they know its rules.

3. Words

  • Realm: an organisational group with its own data, settings and API scopes (os.md §3), not a trust domain. Apps no longer get one each.
  • Package: immutable code: a manifest and its files, at a version (docs/packages.md).
  • Instance: a package version installed in a realm, with a name (the package's, by default), its own identity, its settings and the data it owns. One package can have many instances: crm in biz-a and crm in biz-b, or two in one realm with different names.
  • Owner: what may write a collection: an instance, or the realm (for collections you make by hand).
  • Operation: a write path an instance publishes, with typed input, that keeps its data consistent (7).
  • Data card: what a collection says about itself, so any agent can interpret it (8).
  • Published / internal: a collection's stability. Published is a contract; internal is readable but may change without notice.
  • Handoff: output an instance makes for whoever asked, owned by the requester from then on (10).
  • Thing: a node in the realm's graph: a person, an organization, a place, an event, a topic (9.1).
  • Claim: an edge or a fact, with its owner and provenance (9.2).
  • Reader policy: which owners' claims a reader believes, per label (9.3).

4. Realms

  • You create realms to organise work. home is where you start; a realm per business keeps its lists and settings together (11), not securely isolated.
  • Grants stay the explicit cross-realm API paths (os.md §3.7): read, append, snapshot and call. They do not govern worker files or delegated access.
  • Policies and budgets of a realm apply to everything in it, instances' sessions included. An instance can't override them.
  • An untrusted package is not contained by putting it in a realm of its own, even on a worker limited to that realm. Commands run as the worker's OS user, and delegated work can borrow an agent's wider access. Realm membership and grants are not a sandbox; see os.md §3.9.

5. Instances

5.1 Installing

Installing a package version in a realm is one decision, listing:

  • What it reads in that realm (5.2), and grants it needs from other realms.
  • What it owns: the collections it creates (6).
  • What it publishes: its operations, and the skills and templates it offers the realm's sessions.
  • What it runs on its own: its triggers.
  • Kits, secrets and workers, as packages ask for them today (packages.md §4).

Approval is per instance, so installing the same package in another realm asks again.

5.2 What an instance reads

A package declares what it reads, and you approve it at install, the way Android asks for an app's permissions:

"reads": {
  "items": { "kinds": ["email", "person"] },
  "collections": ["contacts.*"],
  "realms": []
}
  • Within its realm: item kinds and things in the graph, and collections by name, or <instance>.* for everything an instance owns. Files on workers aren't covered: realms don't isolate them (os.md §3.9).
  • Other realms through the API: grants, which the install asks for as today.
  • What this limits is the instance's API reads, not its sessions' file access or delegated work. It never hides the instance's own data from anyone else in the realm: that stays open (2).

5.3 Sessions

An instance's sessions (from its templates, triggers and operations) run in its realm.

  • Identity: they act as the instance, app:<instance>, which is what history records (os.md §4.1) and what ownership checks (6).
  • Labels: app:<instance>, so they can be found and filtered. They show in the realm's lists.
  • Configuration: root's, then the realm's, then the instance's code. In its own sessions the instance's skills, agents and templates win over the realm's, because they are its logic. The realm's policies and budgets always apply.
  • What its API reads address: what 5.2 allows, plus everything it owns. This is not a limit on OS or delegated access.

5.4 Settings

What a package lets you configure, it declares as a JSON Schema:

"settings": {
  "type": "object",
  "properties": {
    "check_in_weeks": { "type": "integer", "default": 6, "description": "Default cadence for a new relationship" },
    "voice": { "type": "string", "description": "How check-ins should sound" }
  }
}
  • Values belong to the instance. They are state, so upgrades keep them; a new setting takes its default, and a dropped one loses its value.
  • The form is generated from the schema (os.md §10).
  • Prompts read them as {{settings.<name>}}, and the instance's sessions get them in their brief.

5.5 Code is immutable

  • The head refuses writes to an instance's code: its skills, agents, commands, templates, workflows, hooks, triggers, views, operations and collection schemas, whoever asks (Settings, the assistant, agents, tokens).
  • Settings shows an instance's code read-only, with the ways to change it: its settings (5.4), an upgrade (12), or a fork (5.6).
  • The digest is checked. An instance keeps its package's digest; the head compares the code it holds with it at start and before an upgrade, and reports any difference.
  • What an instance offers the realm (skills, templates) can be overridden in the realm, for the realm's own sessions: a skill with the same name and labels in the realm wins there, as realms override what they inherit (os.md §3.3). The instance's own sessions keep using its own.

5.6 Forks

To change an app beyond its settings, export it as a new package (crm-acme, with "forked_from": "crm"), change it, and install that. A fork is a different app with its own versions. An instance can be switched to a fork of its package the way it's upgraded (12), keeping its name, settings and data.

6. Ownership

Every collection has an owner: an instance, or the realm.

ReadsWrites
The owner (its sessions)✓✓, directly (records_put, records_delete)
Others in the realm: you, the assistant, the realm's sessions, other instances (within their reads), the realm's tokens✓only through the owner's operations (7)
Other realmsthrough a grantthrough a call grant on an operation
  • Realm-owned collections (ones you make by hand, and handoffs, 10) are written by anything in the realm, as collections are today.
  • Claims (9.2) follow the same rule: an owner writes and retracts only its own.
  • Record triggers fire on every write, whoever made it.
  • Forcing a write. You can write to an instance's collection directly, as yourself. It's a decision that names the collection's invariants from its data card (8), and it's recorded in the history as forced. The assistant and agents can't force.

7. Operations

An operation is how anyone but the owner changes the owner's data. The package declares it:

"operations": [
  {
    "name": "set_cadence",
    "description": "Set how often to be in touch with someone",
    "input": { "type": "object", "required": ["relationship", "weeks"], "properties": { "relationship": { "type": "string" }, "weeks": { "type": "integer", "minimum": 1, "maximum": 52 } } },
    "write": { "collection": "relationships", "id": "$.relationship", "fields": { "cadence_weeks": "$.weeks" } }
  },
  {
    "name": "merge_people",
    "description": "Two relationships are the same person: merge them and their touchpoints",
    "input": { "type": "object", "required": ["keep", "merge"], "properties": { "keep": { "type": "string" }, "merge": { "type": "string" } } },
    "template": "merge-people"
  }
]
  • Three kinds:
    • write: a record update mapped from the input, the way trigger actions map events (os.md §4.3). It runs at once, in the head, and is checked against the schema. It can only touch the fields it names, and can require a condition on the record first (a JSON filter, os.md §4.1).
    • template: a session of the instance, with the input as {{input}}, for changes that need judgment. The caller gets the session's id; the result arrives when it ends.
    • kit: a kit tool of the instance, run at once with mapped arguments, for changes made outside carbon6 (sending mail, an RSVP). Its output is ingested as the instance (docs/knowledge.md §6.2).
  • Callers: agents with app_call {instance, operation, input}; the UI, whose forms for an instance's collections call its operations; views' actions; triggers (an operation action); other realms through a call grant on op:<instance>.<name>.
  • A published operation is a contract, like a published collection (8): changing its input incompatibly, or removing it, is a breaking change (12).

8. Data that explains itself

Every collection has a data card, and every record carries its provenance, so an agent that has never seen the app can use its data, and knows what it may rely on.

The data card (in the package for an instance's collections; written by you, with the assistant's help, for the realm's):

  • What it is: a description, and per field what it means, its units and its examples (in the schema's descriptions).
  • Owner and stability: the instance and package version, and published or internal.
  • Where it comes from: its inputs (item kinds, collections, operations) and how records are derived from them, in words.
  • Invariants, in words: what must stay true ("a relationship's last contact is the date of its newest touchpoint"). Readers learn what the data guarantees; writers see why they must go through operations.
  • Freshness: how and how often it's updated.
  • Operations that change it.

Provenance on each record: the instance and version that wrote it, the session or operation, and derived-from links to the items and records it came from (an email, a meeting note). os.md §4.1's history already keeps who changed what; derived-from is new.

Where agents see it: records_query and records_get return the card the first time a session reads a collection; search results that include records carry the card's summary; the API and the realm explorer show it.

Internal collections are readable like any other. Tool results and the API mark them: internal to crm: may change without notice; build on its published collections instead. Nothing is hidden, and nothing depends on them by accident.

9. The knowledge graph: claims

The graph is where data from every owner meets. It stores claims and doesn't decide which are true; the meaning is in the eye of the reader. This is how RDF's named graphs and Wikidata's claims with references work.

9.1 Things

  • Things are the realm's shared nodes: people, organizations, places, events, topics. They belong to the realm, not to an app.
  • Anyone may create one. Gmail and the CRM may each create "Alice". That two things are the same is a claim too (9.2).

9.2 Claims

  • An edge is (from, label, to, owner); a fact is (thing, attribute, value, owner). Each carries provenance: the owner's package version, the session or operation that made it, when, an optional confidence, and derived-from links to its evidence (8).
  • Anyone who can read both ends may add their own claims. Gmail asserts that a message was sent_by a person; a contact-matching app may assert the same edge, or a different one. Both stand.
  • Only the owner retracts or changes its claims. Disagreeing means adding your own claim, never deleting another's.
  • You are an owner too. A correction is a claim you make. Default policies rank you first (9.3), so you never edit an app's data; you outrank it.
  • Identity is claims: same_as and not_same_as between things, owned like any edge. Merging people stops being a judgment the store makes; whoever resolves identities writes claims, and readers choose whose to follow.
  • A record's links to things and items (os.md §4.1) are edges owned by the record's owner.
  • Edges into another realm are returned to realm-scoped API readers only under a grant; these checks don't cover direct file access.
  • Removing an instance retracts its claims, after offering an export. Each owner has a write quota, so a faulty app can't flood the graph.

9.3 Reader policies

Most readers (search, briefs, an agent asking "who sent this?") don't want to weigh every claim each time. So a realm states default policies, per label:

{ "label": "sent_by", "believe": ["you", "gmail", "*"] }
{ "label": "same_as", "believe": ["you", "google-contacts", "people-linker"] }
  • A policy is configuration, in the realm's settings, and every reader can override it, per query or per agent.
  • With no policy, a reader gets every claim, with its owner, and decides.
  • Ignoring an owner entirely is a policy too.
  • Search, briefs and the graph views apply the realm's defaults unless asked otherwise.

9.4 Shared vocabulary

Claims are only comparable if readers can tell which labels mean the same thing.

  • A small vocabulary in root, readable by every realm: labels (sent_by, sent_to, about, mentions, part_of, attended, same_as, …, the core set of memex.md §4.3) and item kinds (email, event, contact, document, photo, …), each with its meaning and schema.
  • An owner describes its labels in its data card, and maps each to a shared one where it fits. Readers find equivalent claims by different owners through the mapping; labels with no mapping are still readable, with the owner's description.
  • The vocabulary grows by publishing, like commons (os.md §3.7): a realm proposes a label, and it's added when you accept it.

9.5 Enrichment

A processor makes its input richer without changing it:

  • Results link to what they're about. A CRM relationship is linked to the person thing, so the person now shows the relationship, cadence and last contact, in the graph, in search and in briefs.
  • Results link to what they came from. A touchpoint's derived-from links point at the email, so any agent can check the evidence.
  • The input is never written. The CRM can't change mail or contacts; it adds claims and records it owns, beside them.

10. Handoff

A service makes something for whoever asked and keeps no hold on it.

  • The output belongs to the requester's realm. Files are published as the realm's Outputs; records go in realm-owned collections. They carry provenance (made by decks 1.2, from this brief, in this session) but no write lock.
  • The service keeps only what it needs. decks owns an internal jobs collection (brief, outline, stage) while it works; once the deck is delivered, the job is history.
  • Later changes don't need the service. Anyone can edit the delivered deck. decks' revise operation takes any deck file and notes, whether decks made it or not.

11. Many tenants

  • One instance per business realm. crm in biz-a reads biz-a's mail and contacts and owns biz-a's relationships; crm in biz-b the same for biz-b. Realm-scoped API queries keep their lists and data distinct; this does not isolate their agents or worker files.
  • One package, one build. Instances share their package version's code and kits; each has its own settings and data.
  • Different versions: each instance upgrades on its own, so one business can try a new version first.
  • Across tenants on purpose: an instance in one realm (a portfolio view in home, say) reads the businesses' published collections through grants you make.

12. Upgrades and downgrades

  • No merge. Code can't drift (5.5), so an upgrade replaces version A's code with B's, and a downgrade does the reverse. The previous version stays in the registry for rollback.
  • Owned schemas follow os.md §4.1: an additive change applies at once; anything else needs a migration, approved as a decision. A downgrade that would need one asks the same way, or is refused when the package gives none.
  • Contracts. Changing a published collection's schema incompatibly, or a published operation's input, or removing either, is a breaking change: the package's major version must change, and the upgrade decision lists what depends on it in the realm (views, triggers, other instances' reads, grants). Internal collections carry no contract.
  • Approval asks again only for what grew: reads, grants, kits' permissions, triggers.

13. What this replaces

  • An app is a realm (os.md §5): apps become instances in realms you choose.
  • The three-way upgrade (os.md §5.2a) and its conflict decisions.
  • Editing an app's configuration in Settings and through the API.
  • Libraries copied into the requiring realm (packages.md §3): a library is a package with no collections, installed as an instance whose skills and templates it offers the realm.
  • Template grants for apps requiring apps (packages.md §6): a package that requires another uses an instance of it in the same realm (installed with it, or one already there) through its operations, or one in another realm through a call grant.
  • The memex as judge of the graph: its automatic merges and links become claims by system packages, and its review queue becomes decisions that assert your claims (docs/knowledge.md §7).
  • The tool and daemon kinds of this doc's first draft: ownership decides who writes, not a kind of app.
  • Unchanged: realms, grants, policies and budgets; kits and their sandbox; the registry, digests and install decisions; collections, decisions, triggers, series and views.

14. Upgrading what's installed

  • Each app realm (decks, today) gets a decision: move the app into a realm you choose (home, say) as an instance there, or keep it where it is as an instance in its own realm.
  • Moving: sessions can't move (os.md §3.5), so the old realm keeps them, readable. Its records are copied to the new instance's collections with their history and where they came from. The old realm is then yours to delete, which asks as it does today.
  • Drift: the head compares each app's configuration with its install's digest. If you had edited it, a decision offers to export your edits as a fork and install that, or to drop them.
  • Collections you made by hand become realm-owned, with data cards to write (the assistant drafts them, for you to approve).
  • decks 1.2.0: a make operation (template), internal jobs, deck files and a realm-owned decks record as handoff, a shared themes collection published by the instance, and revise taking any deck file.

15. Build order

  1. Ownership: owners on collections, writes refused to non-owners, forced writes as decisions, and the instance identity in history.
  2. Instances: installing a package in a realm you choose, by name, more than once; reads approved at install; sessions as the instance; settings.
  3. Immutable code: read-only instance code, the digest check, upgrades and downgrades without a merge, forks.
  4. Operations: write and template operations, app_call, the operation trigger action, UI forms and views' actions through operations, and call grants on them.
  5. Data cards and provenance: cards in packages and for realm collections, derived-from links, cards in tool results, search and the explorer, internal marked.
  6. Claims: things anyone may create, owned edges and facts, reader policies with realm defaults, the shared vocabulary in root, and the memex's links moved over as claims. This comes with docs/knowledge.md's step 1, which puts the graph in the head.
  7. Moving existing apps (14), libraries as instances, and decks 1.2.0.

16. Decisions

QuestionDecisionWhy
What a realm isAn organisational group you choose; apps don't get one eachGroups data and settings, with API scopes; not a security boundary
Reading within a realmOpen to every agent, with data that describes itselfNobody knows in advance which data will be useful to which agent; silos waste the knowledge graph
WritingOnly the owner, directly or through its published operations; you can force, as a decisionOnly the owner knows its invariants
What an instance may readDeclared by the package, approved per instance at installLimits the instance's API reads without hiding anyone's data
Untrusted packagesA realm of their own is not a sandboxShared-worker files and delegated access are not contained by realm membership
Internal dataReadable, marked as internal and unstableOpen without inviting dependence on what may change
CodeImmutable per version; settings, forks and upgrades are the only changesA deployed app is exactly a version, so nothing drifts and nothing merges
Many tenantsOne instance per realmDistinct lists and API scopes come from the realm, not from configuring the app; this is not tenant security isolation
Service outputHanded off to the requester's realm, with provenanceIt's the requester's work, and needs nothing more from the service
Links and factsClaims with owners; anyone adds their own, only the owner retractsThe graph stores and doesn't judge; each owner keeps its own consistency
Which claims to believeThe reader's choice, with realm defaults per label, you firstMeaning is in the eye of the reader, but most readers want a sensible default
Things (people, places)The realm's, created by anyone; identity by same_as claimsNo app is canonical; data from every owner meets on the same nodes
Mail, calendar, contactsIn the realm whose accounts they are, owned by that realm's mirror app instance; stored by the head (docs/knowledge.md)The memex is the database, not an owner; the mirror is the one writer that keeps the copy true

17. Open questions

  • Write operations beyond mapping: some invariants need a computed value (a count, a maximum). Is a small expression language enough, or should those be template operations?
  • Policies that depend on content: "believe the CRM's works_at only above confidence 0.8" needs conditions in a policy, not just an order of owners. Is an order enough to start?

Settled since the first version: mail, calendar and contacts are in the realm whose accounts they are, owned by that realm's mirror apps, and stored by the head (docs/knowledge.md); and two apps tracking the same idea is no conflict, since things are shared and claims are owned (9).

18. As built

18.1 Instances, ownership and immutable code (steps 1–3)

  • Migration 0042:
    • installs is rebuilt with a name (the instance's, unique per realm), settings (the values) and adopted;
    • collections, series and triggers get an owner, and sessions an instance;
    • the collections, series and triggers an installed app's package names become that app's.
    • Upgrade checks: every install keeps its id, package, version, realm and state, named after its package; the collections installed apps brought are theirs. Fixture c6h-v0041.db keeps the shape before.
  • Instances (instances.rs): an installed app or library in a realm, with its package's manifest read from the registry by digest.
    • Its code is never copied. lists::effective_tagged layers it: for a realm's sessions, root's entries, then what its instances offer, then the realm's own; for an instance's sessions, root's, the realm's, then the instance's own. Each entry says where it came from (GET /api/v1/realms/{id}/effective/{key}; the explorer marks an app's entries).
    • Settings (settings in the manifest, a JSON Schema of an object): values per instance (GET/PUT /api/v1/installs/{id}/settings), defaults filled in, and {{settings.<name>}} filled in its code wherever it applies.
    • Reads (reads in the manifest) are approved with the install and checked when an instance's session reads another owner's collection (records_query, records_get). Item kinds are recorded; they are enforced once knowledge is in the head.
  • Installing:
    • in the realm asked for, else the one the package suggests (realm) if it exists, else home; a realm that does not exist is a problem ("create it first"), and root and commons hold no apps;
    • under the name asked for, else the package's; a package can be installed many times;
    • what it requires goes beside it, in the same realm; a collection or series it brings that the realm already has is a problem.
    • Roles: an app owns something (collections, series, triggers, settings) or names a realm as packages first did; a library owns nothing.
  • Ownership: a write to an app's collection or series comes from the app (app:<name>: its sessions, triggers, views and seed records) or is refused, pointing at the app's operations. You can force one (?force=true on a record write): it opens a decision ("Write it" / "Cancel"), and the write is recorded as you forced. Tokens and the assistant can't force.
  • Immutable code: an app's collection schemas, series and triggers change only with the app; you may switch its triggers off and on. Settings lists can't reach its code, since it isn't in them.
  • Sessions as an instance: templates an instance offers (from the realm, a view of its, or its trigger) start sessions that act as it: instance on the session, the automatic label app:<name>, its entries over the realm's, its memory notes, and its settings filled in. Subagents and side chats act as their parent does.
  • Upgrades and downgrades (POST /api/v1/installs/{id}/upgrade with version, and package for a fork): no merge. The decision lists what changes in its code; the options are Upgrade, Downgrade or Switch. A new schema that rejects records already there is a problem ("needs a migration"). Triggers follow the new version by name, keeping their webhook URLs and whether they're on; settings the new version drops lose their values.
  • Forks: GET /api/v1/apps/export?realm=…&instance=…&fork=<name> gives the package as a new one with forked_from; an instance switches to a fork of its package (or back).
  • Digests are checked once per head start for each installed package; a mismatch shows as a problem on the install.
  • Removing an instance deletes what it owns (collections and their records, series, triggers), after the decision; its sessions and the realm stay.
  • Apps installed before: at start, the copies of their code they wrote into their realm's lists are removed where they are still as installed; entries you had edited stay as the realm's own, and a decision asks whether to keep them or use the app's.
  • Not yet: app realms are not moved into home (step 7), and exports still only matters across realms, through a grant.

18.2 Operations (step 4)

  • In the manifest: operations, each with a name, a description, an input (a JSON Schema of an object) and one of:
    • write {collection (one the package owns), id ("$.record"; none: a new record), fields (mapped from the input), when (a query filter the record must match first), delete};
    • template (one of the package's templates).
    • kit operations are declared in the type but refused until kits run from the head (docs/knowledge.md, step 3).
    • Checked when the package is added: what it writes is its own, what it starts is its template.
  • Calling (operations.rs): the input is checked against its schema; the work is done as the app, and who asked is kept with it (app:<instance> op:<name> <caller> in the record's history).
    • A write touches only the fields it names; a when that the record doesn't match is refused, saying so.
    • A template operation starts the app's session (labelled op:<instance>.<name>) with the input as {{input}}.
  • Callers:
    • the API: GET /api/v1/apps/{realm}/{instance}/operations and POST …/operations/{name} with {input} (a realm's token, in its realm);
    • agents: the app_call tool, which with no arguments lists what there is to call in its realm, and reaches another realm only through a call grant on op:<instance>.<name>;
    • triggers: the operation action, {instance, operation, input} with the event mapped in;
    • views: an action with operation (<instance>.<name>, or the name alone for the collection's owner) and input mapped from the record ("$.id", "$.fields.x");
    • the UI: an app's collection shows its operations as buttons, each a form made from its input's schema and filled from the record you pick.

18.3 Data cards, provenance and contracts (step 5)

  • Migration 0043: collections.card, records.derived_from and records.provenance.
  • The data card (card on a collection: stability, sources, invariants, freshness) comes with an app's collections in its package, and you describe the realm's own (PATCH /api/v1/collections/{name} with card, or Describe… on its page). The head fills in the owner's package version and the operations that change it. Field meanings stay in the schema's descriptions.
  • Where it shows:
    • an agent's first records_query or records_get of a collection carries about, the card in words (once per session);
    • an internal collection's records carry a note for every reader but its app, in tool results and in the API's record pages;
    • records mirrored for search include the card;
    • the API, the collection's page and the realm explorer show it.
  • Provenance: every write records who wrote the current version (by, and the app, its package and version, the session or operation, forced). derived_from (item:<id>, record:<collection>/<id>, a URL) is given by agents' records_put, mapped by write operations and triggers' write actions, and set by grant snapshots (record:<realm>/<collection>/<id>).
  • Contracts: an upgrade within a major version (a minor version below 1.0) can't narrow what the app publishes. That means a published collection losing a field, changing a field's type, dropping enum choices or requiring a new field, and a published operation's input the same way or the operation removed. Internal collections and operations may change. The decision names what in the realm uses what the app publishes: views, triggers, other apps' reads and grants.

18.4 Claims (step 6)

  • In the knowledge store (memex migration 0008): every link is a claim with an owner.
    • Existing links and facts get one from their made_by: session: becomes realm, app:<name> stays an app, and anything else (you, gmail, a pipeline) is its own owner. A trigger does the same for writers that don't name an owner.
    • Retracted claims move to retracted_links, out of the graph.
  • Calls: memex.claims.add / retract / retract_owner / list and memex.things.create. The head stamps the owner and never takes it from the caller: you are you; an app's session is app:<name>; the realm's sessions and tokens are realm.
    • Only the owner retracts its claims.
    • Each owner may add at most 20,000 claims an hour.
  • API: GET /api/v1/memex/claims (about = thing:<key> or item:<id>, label, owner, policy=all, same_as), POST /api/v1/memex/claims, DELETE /api/v1/memex/claims/{id} and POST /api/v1/memex/things. Agents get claims, claim_add, claim_retract and thing_create.
  • Reader policies: a realm settings list, claim_policies: {label, believe: [owners in order]}, where app:* matches every app and * everyone else. Without a policy, yours come first, then everyone's.
    • The head applies them to claims lists, judging an owner's own label as the shared label it maps to.
    • The graph view shows only believed relations.
  • Identity: same_as and not_same_as claims; same_as=true follows the believed ones, transitively.
  • Vocabulary: a root settings list, vocabulary, seeded once with the core labels and item kinds. Packages declare their own labels (vocabulary, with maps_to). A claims list gives each claim what its label means, and a label filter finds owners' labels mapped to it.
  • Facts are claims: they carry an owner; anyone but their owner (or you) is refused when retiring or replacing one.
  • Removing an app retracts its claims.
  • The explorer shows a thing's claims with their owners, and whether the realm believes each.
  • Not yet: policies with conditions (a confidence threshold), briefs applying policies, and edges into other realms through grants.

18.5 Moving what's installed (step 7)

  • Apps in a realm made for them (before instances) are each offered a move, once: "Move it", with the realm to move into, or "Keep it where it is".
    • Moving installs it in the chosen realm and copies what it owns: records get new ids and keep their fields, their history and derived_from (record:<old realm>/<collection>/<id>), and series keep their points.
    • It is then removed from where it was; that realm keeps its sessions and is yours to delete.
    • Its webhook triggers get new URLs.
  • Hand-off collections: a package's collection with handoff: true is made as the realm's, not the app's. It stays, and anything in the realm writes it, after the app is gone.
  • decks 1.2.0 (examples/apps/decks.json, removed 2026-10-31: decks are part of carbon6, docs/docs.md §13): no realm of its own, so it installs in home by default. It has:
    • jobs: internal, the decks being made;
    • decks: handed off, finished decks with their files;
    • themes: published, with an add_theme write operation;
    • make and revise template operations. revise takes any deck file.
  • Libraries have been instances with no collections since step 1.

docs/apps.md on GitHub