Part of Stem. This page defines the kind kind. A resource of this kind holds a Kind descriptor; every other kind on this site is such a resource, and so is this one. The formal schema of this kind's state is attached as the schemaDefinition of this page, and it is an include of the Kind descriptor schema.
Descriptor
{
"name": "Kind",
"description": "The definition of a resource kind.",
"state": "snapshot",
"schema": "hm://z6MkiAKDcRSzQ4zPZfnJcS5HYx5MwgN6MU9foHihJGrhqNBj/stem/kinds/kind/value",
"naming": "named",
"children": false,
"access": "inherit",
"retention": "history",
"links": [
{ "path": "/schema", "kind": "schema" }
]
}State
The value is a Kind descriptor. Its fields are defined on the Kind descriptor page: name, description, state, schema, naming, children, access, target, retention and links. The schema field emits a schema link, so fetching a kind pulls in the schema its state must satisfy.
Rules
The handler validates the descriptor strictly against the Kind descriptor schema and rejects an invalid one.
A descriptor's schema must resolve to a schema, either a schema resource or a document with schemaDefinition. Until it resolves, nodes of the kind are stashed as missing a dependency.
When access is target, target must be present and must point at a field whose type is a node-ref or a principal.
A new version of a kind applies to Node blobs indexed after it. Open: whether a kind change should ever re-evaluate existing nodes, or whether a changed descriptor must be a new kind.
The daemon ships the eight core descriptors built in, keyed by their URLs under stem/kinds, so it does not need the network to index core data. It still indexes the published copies like any resource, and a mismatch between a built-in and its published descriptor is reported, not silently resolved.
The loop closes here: this kind's descriptor says its state schema is kinds/kind/value, which includes data/kind, which is the schema this very descriptor satisfies. The kind kind is described by itself, in the same way the meta-schema validates as an instance of itself.
Today (HM24)
Nothing. Resource types were Go code: one indexer per blob type, with its identity, visibility and link rules fixed in the daemon (Signed blobs). Adding a type was a protocol change.
Example
The kind comment, published as a resource:
{
"type": "Snapshot",
"signer": { "/": { "bytes": "7QHm…" } },
"sig": { "/": { "bytes": "…" } },
"ts": 1759905000000,
"schema": "hm://z6MkiAKDcRSzQ4zPZfnJcS5HYx5MwgN6MU9foHihJGrhqNBj/stem/kinds/kind/value",
"value": {
"name": "Comment",
"state": "snapshot",
"schema": "hm://z6MkiAKDcRSzQ4zPZfnJcS5HYx5MwgN6MU9foHihJGrhqNBj/stem/kinds/comment/value",
"naming": "unnamed",
"children": false,
"access": "target",
"target": "/target",
"retention": "latest",
"links": [
{ "path": "/target", "kind": "target" },
{ "path": "/threadRoot", "kind": "dep" },
{ "path": "/replyParent", "kind": "dep" },
{ "path": "/body", "kind": "link" }
]
}
}{
"type": "Node",
"signer": { "/": { "bytes": "7QHm…" } },
"sig": { "/": { "bytes": "…" } },
"ts": 1759905000000,
"kind": "hm://z6MkiAKDcRSzQ4zPZfnJcS5HYx5MwgN6MU9foHihJGrhqNBj/stem/kinds/kind",
"parent": "bafyreis555hmtf6bs5e4rynnefjqxirhxo77zbka74ztj2wyuhvauvzhma",
"name": "comment",
"target": { "kind": "snapshot", "snapshot": { "/": "bafy2bzacem…" } }
}See also
Resource kinds: the index and the rules for defining a kind.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime