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
47 changes: 47 additions & 0 deletions src/shared/generated/genome/CandidateArtifact.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ArtifactId } from "./ArtifactId";
import type { PageKind } from "./PageKind";
import type { ResidencyHint } from "./ResidencyHint";

/**
* A fully-described candidate ready for scoring. The caller
* (PR-3c's working-set walker) populates these from substrate
* sources; PR-3b's `rank` consumes them.
*
* `kind` determines which sub-pool of the `RankedPool` this
* candidate lands in (LoRALayer → layers, MoEExpert → experts,
* Engram → engrams). `KVCache` candidates are silently dropped
* because the spec's `RankedPool` only carries the three
* composition-relevant sub-pools — KV cache pages are working-set
* state, not recall candidates. If a future PR adds a fourth
* sub-pool for KV chunks, that mapping flips on.
*/
export type CandidateArtifact = { kind: PageKind, artifactId: ArtifactId,
/**
* Cosine similarity between query embedding and artifact
* embedding. Caller computes (PR-3c via embedding service).
* Range `[0.0, 1.0]`.
*/
semanticFactor: number,
/**
* How well this artifact performed for this persona on
* recent similar tasks. Caller computes (PR-3c via sentinel).
* Range `[0.0, 1.0]`.
*/
outcomeHistoryFactor: number,
/**
* Unix-ms timestamp of last use. Drives `recency_decay`.
*/
lastUsedMs: number,
/**
* Where this candidate lives + acquisition cost. PR-3c
* populates from the working-set-manager + federation
* registry.
*/
residency: ResidencyHint,
/**
* Provenance trust adjusted by persona overrides. Caller
* computes (PR-3c via trust registry + persona context).
* Range `[0.0, 1.0]`.
*/
provenanceTrustFactor: number, };
2 changes: 2 additions & 0 deletions src/workers/continuum-core/src/genome/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,5 @@ pub use recall_scoring::{
grid_penalty, local_role_score, recency_decay, score as recall_score, tier_proximity_for,
DEFAULT_RECENCY_HALF_LIFE_MS,
};
pub mod recall_impl;
pub use recall_impl::{CandidateArtifact, LocalDemandAlignedRecall};
Loading
Loading