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

/**
* Pre-admission candidate — a unit of cognition that *might* become an
* `Engram` if both the structural gate and the policy recipe approve.
*
* Constructed by callers (typically by an AIRC inbox converter or by a
* chat/tool wrapper) from the source-side data. Does NOT carry an
* engram id — id assignment happens at admission time inside the
* `Admit` decision.
*/
export type AdmissionCandidate = {
/**
* The would-be engram content (text in v1; structured later).
*/
content: string,
/**
* Engram category to assign on admission (Episodic for an AIRC
* observation, Procedural for an admitted skill update, etc.).
*/
kind: EngramKind,
/**
* Where this candidate came from. Carries the protocol-compatible
* reference fields used for verification + later forensics.
*/
origin: EngramOrigin,
/**
* Trust tier of the source AT CANDIDATE TIME. The gate compares
* against `AdmissionConfig.trust_threshold` for the structural
* trust check; recipes may also re-inspect for finer-grained policy.
*/
trust_state: TrustState,
/**
* Free-text recall keys / tags to attach if admitted.
*/
recall_keys: Array<string>,
/**
* SHA-256 of canonical content (caller computes — usually matches
* `origin`'s `content_hash`). Used by recipes for content-dedup.
* Required because dedup is a hot path and we don't want the recipe
* re-hashing on every evaluate.
*/
content_hash: string, };
25 changes: 25 additions & 0 deletions src/shared/generated/persona/AdmissionConfig.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 { TrustState } from "./TrustState";

/**
* Admission gate configuration — thresholds the structural gate
* enforces and defaults the recipe pipeline can consult.
*
* Per-persona; multiple personas in one process each carry their own
* `AdmissionConfig`. Defaults via `AdmissionConfig::permissive_v1()`
* (suitable for fuzzy/agent personas just bootstrapping a memory) and
* `AdmissionConfig::strict_v1()` (suitable for SOC governance roles).
*/
export type AdmissionConfig = {
/**
* Minimum trust tier required for any admission. Sources below
* this threshold get `AdmissionError::TrustBoundaryRejected` —
* the recipe is not even consulted.
*/
trust_threshold: TrustState,
/**
* How long a quarantined candidate stays in the quarantine store
* before auto-dropping (epoch-ms span). Used by recipes when they
* emit `Quarantine` decisions.
*/
quarantine_ttl_ms: number, };
2 changes: 2 additions & 0 deletions src/shared/generated/persona/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ export type { ActivateSkillResult } from './ActivateSkillResult';
export type { ActivityDomain } from './ActivityDomain';
export type { AdapterInfo } from './AdapterInfo';
export type { AdequacyResult } from './AdequacyResult';
export type { AdmissionCandidate } from './AdmissionCandidate';
export type { AdmissionConfig } from './AdmissionConfig';
export type { AdmissionDecision } from './AdmissionDecision';
export type { AdmissionDropReason } from './AdmissionDropReason';
export type { AdmissionError } from './AdmissionError';
Expand Down
Loading
Loading