shadowgraph_link
Create a named directed relationship between two existing entities to record how decisions, facts, or alternatives relate. Enables later traversal and replacement tracking when superseding links.
Instructions
Create one named, directed relationship between two entities that already exist. Read relationships back with shadowgraph_traverse; shadowgraph_supersede records replacement and its own relation. Every call mints a new relation id, so a repeat duplicates the relationship. There is no unlink tool.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Target entity id. Must already exist. | |
| from | Yes | Source entity id. Must already exist: a decision, attempt, memory, fact, or alternative. | |
| relation | Yes | Relationship name, chosen by the caller and stored verbatim, such as depends_on, contradicts, or informs. It is what shadowgraph_traverse filters and explains hits by, so keep names consistent. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Identifier minted for this relationship. A new one on every call. | |
| to | Yes | Target entity identifier. | |
| from | Yes | Source entity identifier. | |
| kind | Yes | Always "relation". | |
| relation | Yes | Relationship name as supplied. | |
| temporal | Yes | Bi-temporal window: validFrom, validTo, recordedAt, invalidatedAt. | |
| createdAt | Yes | ISO 8601 creation time. | |
| schemaVersion | Yes | Storage schema version. |