net.anisota.observatory.element

anisota.net

Documentation

One custom Observatory element — a button, note, quote, reminder, divider, spacer, heading or widget — as its own record, so it can be shared and saved ('learned') by other users, mirroring the spell architecture. Written by src/utils/observatoryElementService.js, which always writes exactly the payload key matching `type` and nothing for the others. The element's place and enabled state live in the separate ordering index at net.anisota.observatory.layout/self (entries: [{ rkey, enabled, order }]). Saved layouts (net.anisota.observatory.layout) embed snapshots of these elements rather than referencing them: a snapshot is this record's type, name, description and payload, without timestamps, attribution or $type.

main record

One custom Observatory element — a button, note, quote, reminder, divider, spacer, heading or widget — as its own record, so it can be shared and saved ('learned') by other users, mirroring the spell architecture. Written by src/utils/observatoryElementService.js, which always writes exactly the payload key matching `type` and nothing for the others. The element's place and enabled state live in the separate ordering index at net.anisota.observatory.layout/self (entries: [{ rkey, enabled, order }]). Saved layouts (net.anisota.observatory.layout) embed snapshots of these elements rather than referencing them: a snapshot is this record's type, name, description and payload, without timestamps, attribution or $type.

Record Key any Any valid record key

Properties

button ref #button Optional

No description available.

createdAt string datetime Required

When the element was first crafted; kept across edits.

createdBy ref #createdBy RequiredNullable

The original crafter, carried across a learn. Null when the writer had no attribution to record.

description string Required

What the element is for, trimmed; may be empty.

divider ref #divider Optional

No description available.

heading ref #heading Optional

No description available.

name string Required

The element's name, trimmed; may be empty. A button with an empty label shows its name.

note ref #note Optional

No description available.

quote ref #quote Optional

No description available.

reminder ref #reminder Optional

No description available.

source ref #source Optional

No description available.

spacer ref #spacer Optional

No description available.

type string Required

Which kind of element this is, and so which one payload key the record carries. A reader skips a type it does not know.

maxLength: 32 bytes
Known values: button, note, quote, reminder, divider, spacer, heading, widget
updatedAt string datetime Required

When the element was last written.

widget ref #widget Optional

No description available.

View raw schema
{
  "description": "One custom Observatory element — a button, note, quote, reminder, divider, spacer, heading or widget — as its own record, so it can be shared and saved ('learned') by other users, mirroring the spell architecture. Written by src/utils/observatoryElementService.js, which always writes exactly the payload key matching `type` and nothing for the others. The element's place and enabled state live in the separate ordering index at net.anisota.observatory.layout/self (entries: [{ rkey, enabled, order }]). Saved layouts (net.anisota.observatory.layout) embed snapshots of these elements rather than referencing them: a snapshot is this record's type, name, description and payload, without timestamps, attribution or $type.",
  "key": "any",
  "record": {
    "nullable": [
      "createdBy"
    ],
    "properties": {
      "button": {
        "ref": "#button",
        "type": "ref"
      },
      "createdAt": {
        "description": "When the element was first crafted; kept across edits.",
        "format": "datetime",
        "type": "string"
      },
      "createdBy": {
        "description": "The original crafter, carried across a learn. Null when the writer had no attribution to record.",
        "ref": "#createdBy",
        "type": "ref"
      },
      "description": {
        "description": "What the element is for, trimmed; may be empty.",
        "type": "string"
      },
      "divider": {
        "ref": "#divider",
        "type": "ref"
      },
      "heading": {
        "ref": "#heading",
        "type": "ref"
      },
      "name": {
        "description": "The element's name, trimmed; may be empty. A button with an empty label shows its name.",
        "type": "string"
      },
      "note": {
        "ref": "#note",
        "type": "ref"
      },
      "quote": {
        "ref": "#quote",
        "type": "ref"
      },
      "reminder": {
        "ref": "#reminder",
        "type": "ref"
      },
      "source": {
        "ref": "#source",
        "type": "ref"
      },
      "spacer": {
        "ref": "#spacer",
        "type": "ref"
      },
      "type": {
        "description": "Which kind of element this is, and so which one payload key the record carries. A reader skips a type it does not know.",
        "knownValues": [
          "button",
          "note",
          "quote",
          "reminder",
          "divider",
          "spacer",
          "heading",
          "widget"
        ],
        "maxLength": 32,
        "type": "string"
      },
      "updatedAt": {
        "description": "When the element was last written.",
        "format": "datetime",
        "type": "string"
      },
      "widget": {
        "ref": "#widget",
        "type": "ref"
      }
    },
    "required": [
      "type",
      "name",
      "description",
      "createdBy",
      "createdAt",
      "updatedAt"
    ],
    "type": "object"
  },
  "type": "record"
}
button object

A tile that does something when tapped.

Properties

accent string RequiredNullable

A theme-colour treatment: tinted (accent frame and leading text) or inverted (solid accent). primary/secondary/tertiary are legacy values older records carry. Null is none.

maxLength: 32 bytes
Known values: tinted, inverted, primary, secondary, tertiary
label string Required

The tile's label; empty means the action's catalog label, then the element's name.

size string Required

Legacy geometry: what the row migration reads to place a tile that no layout row claims yet (half pairs up, full takes a row, xl a double-height row; sm/md/lg read as half). Rows are the geometry once a layout has them.

maxLength: 32 bytes
Known values: half, full, xl, sm, md, lg
subLabel string Required

The line under the label; empty means the action's catalog line, if any.

variant string RequiredNullable

The tile's treatment; null is the standard tile.

maxLength: 32 bytes
Known values: primary, featured, quiet, bold, glow, bare
View raw schema
{
  "description": "A tile that does something when tapped.",
  "nullable": [
    "variant",
    "accent"
  ],
  "properties": {
    "accent": {
      "description": "A theme-colour treatment: tinted (accent frame and leading text) or inverted (solid accent). primary/secondary/tertiary are legacy values older records carry. Null is none.",
      "knownValues": [
        "tinted",
        "inverted",
        "primary",
        "secondary",
        "tertiary"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "action": {
      "ref": "#buttonAction",
      "type": "ref"
    },
    "label": {
      "description": "The tile's label; empty means the action's catalog label, then the element's name.",
      "type": "string"
    },
    "size": {
      "description": "Legacy geometry: what the row migration reads to place a tile that no layout row claims yet (half pairs up, full takes a row, xl a double-height row; sm/md/lg read as half). Rows are the geometry once a layout has them.",
      "knownValues": [
        "half",
        "full",
        "xl",
        "sm",
        "md",
        "lg"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "subLabel": {
      "description": "The line under the label; empty means the action's catalog line, if any.",
      "type": "string"
    },
    "variant": {
      "description": "The tile's treatment; null is the standard tile.",
      "knownValues": [
        "primary",
        "featured",
        "quiet",
        "bold",
        "glow",
        "bare"
      ],
      "maxLength": 32,
      "type": "string"
    }
  },
  "required": [
    "label",
    "subLabel",
    "action",
    "size",
    "variant",
    "accent"
  ],
  "type": "object"
}
buttonAction object

What a button does.

Properties

display string Optional

pin-post only: open the post's thread page, or its card in a modal.

maxLength: 32 bytes
Known values: thread, modal
searchType string Optional

pin-search only: which results to open.

maxLength: 32 bytes
Known values: posts, actors
type string Required

navigate: an in-app path. external: a web URL, opened outside the app. event: an app-wide surface by its event name (anisota:openPostComposer, anisota:openNotifications, …). spell: cast or lift the spell with this rkey. pin-post / pin-list: an at:// URI. pin-profile: a handle or DID. pin-search: a search query.

maxLength: 32 bytes
Known values: navigate, external, event, spell, pin-post, pin-profile, pin-list, pin-search
value string Required

The path, URL, event name, spell rkey, at:// URI, handle or DID, or query the type names.

View raw schema
{
  "description": "What a button does.",
  "properties": {
    "display": {
      "description": "pin-post only: open the post's thread page, or its card in a modal.",
      "knownValues": [
        "thread",
        "modal"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "searchType": {
      "description": "pin-search only: which results to open.",
      "knownValues": [
        "posts",
        "actors"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "type": {
      "description": "navigate: an in-app path. external: a web URL, opened outside the app. event: an app-wide surface by its event name (anisota:openPostComposer, anisota:openNotifications, …). spell: cast or lift the spell with this rkey. pin-post / pin-list: an at:// URI. pin-profile: a handle or DID. pin-search: a search query.",
      "knownValues": [
        "navigate",
        "external",
        "event",
        "spell",
        "pin-post",
        "pin-profile",
        "pin-list",
        "pin-search"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "value": {
      "description": "The path, URL, event name, spell rkey, at:// URI, handle or DID, or query the type names.",
      "type": "string"
    }
  },
  "required": [
    "type",
    "value"
  ],
  "type": "object"
}
createdBy object

Attribution for the original crafter of this element.

Properties

did string did Optional

A decentralized identifier (DID).

handle string handle Optional

An AT Protocol handle (e.g., alice.bsky.social).

View raw schema
{
  "description": "Attribution for the original crafter of this element.",
  "properties": {
    "did": {
      "format": "did",
      "type": "string"
    },
    "handle": {
      "format": "handle",
      "type": "string"
    }
  },
  "type": "object"
}
divider object

A rule across the grid, optionally labelled. Nothing pairs across it.

Properties

label string Required

No description available.

View raw schema
{
  "description": "A rule across the grid, optionally labelled. Nothing pairs across it.",
  "properties": {
    "label": {
      "type": "string"
    }
  },
  "required": [
    "label"
  ],
  "type": "object"
}
heading object

A section heading across the grid.

Properties

subtitle string Required

No description available.

title string Required

No description available.

View raw schema
{
  "description": "A section heading across the grid.",
  "properties": {
    "subtitle": {
      "type": "string"
    },
    "title": {
      "type": "string"
    }
  },
  "required": [
    "title",
    "subtitle"
  ],
  "type": "object"
}
note object

A note: a title over a body of text.

Properties

accent string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: tinted, inverted, primary, secondary, tertiary
body string Required

No description available.

size string Required

No description available.

maxLength: 32 bytes
Known values: half, full, xl, sm, md, lg
title string Required

No description available.

variant string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: primary, featured, quiet, bold, glow, bare
View raw schema
{
  "description": "A note: a title over a body of text.",
  "nullable": [
    "variant",
    "accent"
  ],
  "properties": {
    "accent": {
      "knownValues": [
        "tinted",
        "inverted",
        "primary",
        "secondary",
        "tertiary"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "size": {
      "knownValues": [
        "half",
        "full",
        "xl",
        "sm",
        "md",
        "lg"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "variant": {
      "knownValues": [
        "primary",
        "featured",
        "quiet",
        "bold",
        "glow",
        "bare"
      ],
      "maxLength": 32,
      "type": "string"
    }
  },
  "required": [
    "title",
    "body",
    "size",
    "variant",
    "accent"
  ],
  "type": "object"
}
quote object

A quotation and who said it.

Properties

accent string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: tinted, inverted, primary, secondary, tertiary
attribution string Required

No description available.

body string Required

No description available.

size string Required

No description available.

maxLength: 32 bytes
Known values: half, full, xl, sm, md, lg
variant string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: primary, featured, quiet, bold, glow, bare
View raw schema
{
  "description": "A quotation and who said it.",
  "nullable": [
    "variant",
    "accent"
  ],
  "properties": {
    "accent": {
      "knownValues": [
        "tinted",
        "inverted",
        "primary",
        "secondary",
        "tertiary"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "attribution": {
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "size": {
      "knownValues": [
        "half",
        "full",
        "xl",
        "sm",
        "md",
        "lg"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "variant": {
      "knownValues": [
        "primary",
        "featured",
        "quiet",
        "bold",
        "glow",
        "bare"
      ],
      "maxLength": 32,
      "type": "string"
    }
  },
  "required": [
    "body",
    "attribution",
    "size",
    "variant",
    "accent"
  ],
  "type": "object"
}
reminder object

A line of text that shows only inside its visibility window.

Properties

accent string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: tinted, inverted, primary, secondary, tertiary
body string Required

No description available.

size string Required

No description available.

maxLength: 32 bytes
Known values: half, full, xl, sm, md, lg
variant string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: primary, featured, quiet, bold, glow, bare
View raw schema
{
  "description": "A line of text that shows only inside its visibility window.",
  "nullable": [
    "variant",
    "accent"
  ],
  "properties": {
    "accent": {
      "knownValues": [
        "tinted",
        "inverted",
        "primary",
        "secondary",
        "tertiary"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "body": {
      "type": "string"
    },
    "size": {
      "knownValues": [
        "half",
        "full",
        "xl",
        "sm",
        "md",
        "lg"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "variant": {
      "knownValues": [
        "primary",
        "featured",
        "quiet",
        "bold",
        "glow",
        "bare"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "visibility": {
      "ref": "#reminderVisibility",
      "type": "ref"
    }
  },
  "required": [
    "body",
    "visibility",
    "size",
    "variant",
    "accent"
  ],
  "type": "object"
}
reminderVisibility object

When a reminder shows, in local time. Hours are whole hours of the day (0-23): from startHour up to but not including endHour, wrapping past midnight when startHour > endHour (a 20-6 window belongs to the day it starts on). Either bound may stand alone; null leaves that side open. With neither, the reminder shows around the clock.

Properties

daysOfWeek array of integer Optional

The days the window applies to (0 = Sunday … 6 = Saturday), by the day the window starts on. Absent or empty means every day. (Records written before this lexicon may carry null here, which reads the same as absent.)

maxLength: 7 items
endHour integer RequiredNullable

No description available.

minimum: 0maximum: 23
startHour integer RequiredNullable

No description available.

minimum: 0maximum: 23
View raw schema
{
  "description": "When a reminder shows, in local time. Hours are whole hours of the day (0-23): from startHour up to but not including endHour, wrapping past midnight when startHour > endHour (a 20-6 window belongs to the day it starts on). Either bound may stand alone; null leaves that side open. With neither, the reminder shows around the clock.",
  "nullable": [
    "startHour",
    "endHour"
  ],
  "properties": {
    "daysOfWeek": {
      "description": "The days the window applies to (0 = Sunday … 6 = Saturday), by the day the window starts on. Absent or empty means every day. (Records written before this lexicon may carry null here, which reads the same as absent.)",
      "items": {
        "maximum": 6,
        "minimum": 0,
        "type": "integer"
      },
      "maxLength": 7,
      "type": "array"
    },
    "endHour": {
      "maximum": 23,
      "minimum": 0,
      "type": "integer"
    },
    "startHour": {
      "maximum": 23,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "startHour",
    "endHour"
  ],
  "type": "object"
}
source object

Provenance. 'learned' was saved from another user's shared element (see originalUri/originalDid). Absent on an element crafted here.

Properties

originalDid string did Optional

DID of the user this element was learned from

originalUri string at-uri Optional

AT URI of the element record this one was learned from

type string Optional

No description available.

Known values: learned
View raw schema
{
  "description": "Provenance. 'learned' was saved from another user's shared element (see originalUri/originalDid). Absent on an element crafted here.",
  "properties": {
    "originalDid": {
      "description": "DID of the user this element was learned from",
      "format": "did",
      "type": "string"
    },
    "originalUri": {
      "description": "AT URI of the element record this one was learned from",
      "format": "at-uri",
      "type": "string"
    },
    "type": {
      "knownValues": [
        "learned"
      ],
      "type": "string"
    }
  },
  "type": "object"
}
spacer object

A piece of deliberate empty space across the grid.

Properties

size string Required

xl is a double-height beat; anything else a single one.

maxLength: 32 bytes
Known values: full, xl, sm, md, lg, half
View raw schema
{
  "description": "A piece of deliberate empty space across the grid.",
  "properties": {
    "size": {
      "description": "xl is a double-height beat; anything else a single one.",
      "knownValues": [
        "full",
        "xl",
        "sm",
        "md",
        "lg",
        "half"
      ],
      "maxLength": 32,
      "type": "string"
    }
  },
  "required": [
    "size"
  ],
  "type": "object"
}
widget object

A live tile that reports something.

Properties

accent string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: tinted, inverted, primary, secondary, tertiary
kind string Required

What the widget shows. A writer coerces a kind it does not know to patterns; a reader draws one it does not know as patterns too.

maxLength: 32 bytes
Known values: patterns, heatmap, timeOfDay, level, activity, notifications, drafts, postingQueue, spells, quests, trends, lexicons, muteImpact
metrics array of string Optional

activity only: the counters it shows, in the reader's order (score, postsRead, postsCreated, repliesSent, likesSent, repostsSent, likesReceived, repliesReceived, repostsReceived, quotesReceived). Written as ['score'] when none were picked.

showGoal boolean Optional

activity only: a single score counter shows progress toward the reader's patterns intention.

size string Required

No description available.

maxLength: 32 bytes
Known values: half, full, xl, sm, md, lg
variant string RequiredNullable

No description available.

maxLength: 32 bytes
Known values: primary, featured, quiet, bold, glow, bare
View raw schema
{
  "description": "A live tile that reports something.",
  "nullable": [
    "variant",
    "accent"
  ],
  "properties": {
    "accent": {
      "knownValues": [
        "tinted",
        "inverted",
        "primary",
        "secondary",
        "tertiary"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "kind": {
      "description": "What the widget shows. A writer coerces a kind it does not know to patterns; a reader draws one it does not know as patterns too.",
      "knownValues": [
        "patterns",
        "heatmap",
        "timeOfDay",
        "level",
        "activity",
        "notifications",
        "drafts",
        "postingQueue",
        "spells",
        "quests",
        "trends",
        "lexicons",
        "muteImpact"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "lexicons": {
      "ref": "#widgetLexicons",
      "type": "ref"
    },
    "metrics": {
      "description": "activity only: the counters it shows, in the reader's order (score, postsRead, postsCreated, repliesSent, likesSent, repostsSent, likesReceived, repliesReceived, repostsReceived, quotesReceived). Written as ['score'] when none were picked.",
      "items": {
        "maxLength": 32,
        "type": "string"
      },
      "type": "array"
    },
    "showGoal": {
      "description": "activity only: a single score counter shows progress toward the reader's patterns intention.",
      "type": "boolean"
    },
    "size": {
      "knownValues": [
        "half",
        "full",
        "xl",
        "sm",
        "md",
        "lg"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "variant": {
      "knownValues": [
        "primary",
        "featured",
        "quiet",
        "bold",
        "glow",
        "bare"
      ],
      "maxLength": 32,
      "type": "string"
    }
  },
  "required": [
    "kind",
    "size",
    "variant",
    "accent"
  ],
  "type": "object"
}
widgetLexicons object

lexicons only: which ranking to show, and over what window.

Properties

view string Required

No description available.

maxLength: 32 bytes
Known values: trending, top
window string Required

No description available.

maxLength: 32 bytes
Known values: today, week, month, all
View raw schema
{
  "description": "lexicons only: which ranking to show, and over what window.",
  "properties": {
    "view": {
      "knownValues": [
        "trending",
        "top"
      ],
      "maxLength": 32,
      "type": "string"
    },
    "window": {
      "knownValues": [
        "today",
        "week",
        "month",
        "all"
      ],
      "maxLength": 32,
      "type": "string"
    }
  },
  "required": [
    "view",
    "window"
  ],
  "type": "object"
}

Lexicon Garden

@