Arke
ReferenceSchemas

Eidos Schema

Reference for the arke/eidos@v1 base entity schema.

Schema Identifier

arke/eidos@v1

Interface

interface EidosV1 {
  schema: 'arke/eidos@v1';
  id: string;
  type: string;
  created_at: string;

  ver: number;
  ts: number;
  prev: { '/': string } | null;

  properties: Record<string, unknown>;
  relationships: Relationship[];

  edited_by: EditInfo;
  note?: string;
}

Required Fields

FieldTypeConstraint
schemastringMust be arke/eidos@v1
idstringValid entity ID (see ID format below)
typestringNon-empty
created_atstringISO 8601 datetime
vernumberPositive integer (>= 1)
tsnumberUnix timestamp in milliseconds
prevIPLDLink or nullnull iff ver=1
propertiesobjectAt minimum {}
relationshipsarrayAt minimum []
edited_byEditInfoValid structure

Optional Fields

FieldTypeDescription
notestringVersion note describing the change

Entity ID Format

Entity IDs follow specific formats depending on the network and entity type:

Network/TypeFormatExample
Main network26-char ULID (Crockford Base32)01JDEF6W2PKTV9M7P3AB4CDEF1
Test networkII prefix + 24 charsII0DEF6W2PKTV9M7P3AB4CDE
File entitiesF prefix + 25 chars (deterministic)F0DEF6W2PKTV9M7P3AB4CDEF1
Chunk entitiesC prefix + 25 chars (deterministic)C0DEF6W2PKTV9M7P3AB4CDEF1

The ID format uses Crockford Base32 characters: 0-9A-HJKMNP-TV-Z (excludes I, L, O, U to avoid ambiguity).

Relationship Structure

interface Relationship {
  predicate: string;
  peer: string;
  peer_type?: string;
  peer_label?: string;
  properties?: Record<string, unknown>;
}
FieldRequiredDescription
predicateYesRelationship type (e.g., parent, contains, owner)
peerYesTarget entity ID or * for wildcard (used in permissions)
peer_typeNoType hint for the peer entity
peer_labelNoDisplay label for the peer (populated during expansion)
propertiesNoAdditional metadata for the relationship

Relationships are stored on the "from" side. For example, if entity A has a parent relationship to entity B, the relationship is stored on A.

EditInfo Structure

interface EditInfo {
  user_id: string;
  user_label?: string;
  method: 'manual' | 'ai_generated' | 'system' | 'import';
  on_behalf_of?: string;
  on_behalf_of_label?: string;
}
FieldRequiredDescription
user_idYesID of the user or agent making the edit
user_labelNoDisplay name (populated during expansion with ?expand=relationships)
methodYesHow the edit was made
on_behalf_ofNoID of the user the edit is being made for (agent delegation)
on_behalf_of_labelNoDisplay name (populated during expansion)

Edit Methods

MethodDescription
manualUser-initiated edit through the UI or API
ai_generatedContent created or modified by an AI agent
systemSystem-level operation (migrations, automated processes)
importBulk import from external source

Version chain links use the IPLD convention for content-addressed links:

interface IPLDLink {
  '/': string;  // CID (Content Identifier)
}

Example: { "/": "bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku" }

While the naming references IPLD (InterPlanetary Linked Data), actual storage is on Cloudflare R2/D1. CIDs are computed locally using the same algorithm for content-addressing guarantees.

Validation Rules

  1. schema must be arke/eidos@v1
  2. All required fields must be present
  3. ver === 1 requires prev === null
  4. ver > 1 requires prev !== null
  5. edited_by must have valid user_id (non-empty) and method
  6. relationships must be an array of valid Relationship objects
  7. properties must be an object
  8. id must match the entity ID format regex
  9. created_at must be a valid ISO 8601 datetime string
  10. ts must be a positive integer (Unix timestamp in milliseconds)

The base schema does not validate what's inside properties or which relationships exist -- that's delegated to type-specific profiles.

On this page