Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/shared/generated/persona/EdgeKind.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Why two engrams are connected. Determines edge weight defaults and
* algorithm-7 yield-learning behavior — different edge kinds have
* different prior probabilities of producing consumed-by-handler
* recall hits.
*
* Per COGNITION-ALGORITHMS.md §3, the prior ordering is roughly:
* `SharedEntity` > `SharedTopic` > `ConversationalReply` > `CitedIn`
* > `RecallCoOccurrence` > `TaskOutcome`. Exact weights are tuned
* empirically by algorithm 7 in L0-4c; this enum just declares the
* variants the substrate supports.
*/
export type EdgeKind = "shared-entity" | "shared-topic" | "cited-in" | "recall-co-occurrence" | "conversational-reply" | "task-outcome";
25 changes: 25 additions & 0 deletions src/shared/generated/persona/EngramEdge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { EdgeKind } from "./EdgeKind";

/**
* One directed edge from a source engram to a target engram. Stored
* in the source's outbound list; `EngramGraph::in_degree` does the
* inverse lookup by scanning all sources.
*
* Weight is in `[0.0, 1.0]` by convention. Algorithm 3's traversal
* multiplies by `decay_per_hop` per step and prunes below a
* threshold; algorithm 7's yield-learning updates the weight based
* on whether spreading along this edge surfaces engrams that get
* consumed by handlers.
*/
export type EngramEdge = {
/**
* Target engram id. The source is the map key in `EngramGraph`,
* so it's not duplicated on the edge.
*/
target: string, kind: EdgeKind,
/**
* Edge weight in `[0.0, 1.0]`. Used as the multiplier in
* algorithm 3's `propagated = score * edge.weight * decay_per_hop`.
*/
weight: number, };
Loading
Loading