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
25 changes: 25 additions & 0 deletions src/shared/generated/persona/AdmissionDecision.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 { AdmissionDropReason } from "./AdmissionDropReason";
import type { Engram } from "./Engram";

/**
* Outcome of running the admission gate over a candidate engram.
*
* Three terminal states:
* - `Admit` — engram becomes part of the store. Includes the why-string
* for forensic auditability.
* - `Drop` — candidate is rejected; no engram created. Reason is typed.
* - `Quarantine` — candidate is held in a separate quarantine store,
* pending peer review or auto-expiry. Used when the gate is uncertain
* but doesn't want to silently drop.
*
* Per `COGNITIVE-IMMUNE-MODEL.md` §3.8: forensic-not-destructive applies
* to admission too. `Quarantine` preserves the candidate for later
* review without admitting it to the live recall surface.
*/
export type AdmissionDecision = { "decision": "Admit", "data": { engram: Engram, why: string, } } | { "decision": "Drop", "data": { reason: AdmissionDropReason, } } | { "decision": "Quarantine", "data": { engram: Engram, reason: string,
/**
* Quarantine expiry (epoch ms UTC). After this time the
* quarantined candidate auto-drops if not promoted.
*/
expiry_ms: number, } };
10 changes: 10 additions & 0 deletions src/shared/generated/persona/AdmissionDropReason.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Categorized reason for dropping a candidate without admitting.
*
* Distinct from `AdmissionError` (which is for failures of the admission
* machinery itself). `Drop` is the gate's intentional decision; `Error`
* is the gate failing to even reach a decision.
*/
export type AdmissionDropReason = { "reason": "NotMemorable", "detail": { explanation: string, } } | { "reason": "PolicyDeniedAdmission", "detail": { policy_id: string, explanation: string, } } | { "reason": "Duplicate", "detail": { existing_engram_id: string, } };
16 changes: 16 additions & 0 deletions src/shared/generated/persona/AdmissionError.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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";

/**
* Typed failure modes for the admission machinery itself.
*
* Per Joel's no-fallback rule + the `try/catch in execute() is
* forbidden` discipline: these errors are returned, not swallowed.
* Callers handle them explicitly. Admission failure is never
* indistinguishable from "no engram created" — the error variant
* names the cause.
*
* Same shape as `NoLocalModelLoadable` (#1089) and `NoMultimodalBase`
* (#1074).
*/
export type AdmissionError = { "error": "EnvelopeVerificationFailed", "detail": { detail: string, } } | { "error": "TrustBoundaryRejected", "detail": { source_trust: TrustState, threshold: TrustState, } } | { "error": "ReplayDetected", "detail": { event_id: string, previously_seen_at_ms: number, } } | { "error": "RecipeFailure", "detail": { recipe_id: string, detail: string, } } | { "error": "UnsupportedSchemaVersion", "detail": { schema_version: string, } };
75 changes: 75 additions & 0 deletions src/shared/generated/persona/AircMessageRef.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Protocol-compatible reference to an AIRC-substrate event/message.
*
* Per Joel 2026-05-13 (relayed by Codex): Continuum accepts AIRC data
* by **proof/contract**, not by client identity. Any producer that
* emits a valid envelope with these fields populated is acceptable;
* the official `airc` CLI is not privileged. `transport = "airc"` names
* the PROTOCOL; `client_name` is informational only (e.g., "airc-bash",
* "airc-py", "third-party-emitter"). Admission Recipes in PR-2+ judge
* the envelope's signature + provenance + trust metadata, not which
* binary produced the bytes.
*
* Suggested field shape comes from Codex 2026-05-13 broadcast — see
* AIRC log for full design discussion.
*/
export type AircMessageRef = {
/**
* Protocol identifier. Always `"airc"` for this variant; field exists
* to support future cross-protocol references where the variant might
* represent multiple wire protocols.
*/
transport: string,
/**
* AIRC room (channel) the message was posted to.
*/
room_id: string,
/**
* Stable AIRC message/event id within the room.
*/
message_id: string,
/**
* Sender pubkey or peer identity (the AIRC-whois identity, NOT a gh
* login — per the gh-account-not-equal-identity rule from
* `.airc/SAFETY.md` §Identity).
*/
sender_id: string,
/**
* When the sender claims they sent it (epoch ms UTC, signed by sender).
*/
sent_at_ms: number,
/**
* When the receiving persona observed it (epoch ms UTC, local clock).
*/
received_at_ms: number,
/**
* SHA-256 of the canonical content. Used for tamper detection +
* cross-grid forensic re-verification.
*/
content_hash: string,
/**
* Detached signature over the canonical envelope. Verifiable against
* `sender_id`'s public key. Required for the engram to admit via
* non-trivial trust modes; PR-2+ Recipes will enforce.
*/
signature: string,
/**
* Pointers to additional proof material (e.g., forge-alloy contract
* settlement signatures, room-rotation event signatures, attestation
* chain references). Empty for plain messages.
*/
proof_refs: Array<string>,
/**
* Schema version of the envelope this reference describes. v1 starts
* at `"v1"`. Forward-compatibility hinge.
*/
schema_version: string,
/**
* Informational client identity (e.g., "airc-bash", "airc-py",
* "third-party-emitter"). Optional, NOT load-bearing for trust
* decisions. Present so the polity can observe client-population
* telemetry without admission ever depending on it.
*/
client_name: string | null, };
26 changes: 26 additions & 0 deletions src/shared/generated/persona/ChatMessageRef.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Protocol-compatible reference to a Continuum chat message.
*/
export type ChatMessageRef = {
/**
* Continuum chat message id.
*/
message_id: string,
/**
* Continuum room id.
*/
room_id: string,
/**
* Sender (Continuum user id).
*/
sender_id: string,
/**
* When the message was posted (epoch ms UTC).
*/
posted_at_ms: number,
/**
* SHA-256 of canonical content for tamper detection.
*/
content_hash: string, };
63 changes: 63 additions & 0 deletions src/shared/generated/persona/Engram.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// 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";

/**
* A single memorable cognition unit, durably storable + recall-addressable.
*
* Engrams are the unit of long-term cognitive memory. They survive persona
* session boundaries, get indexed for recall, and carry full provenance so
* any persona (including future-self) can audit "where did this belief
* come from + why was it admitted." The biological metaphor (memory trace)
* is structural, not decorative — engrams accumulate, decay, get yanked,
* and contribute to recall via the same mechanisms a biological memory
* store does.
*/
export type Engram = {
/**
* Stable engram id. Used for recall keys, deduplication, and as the
* referent target for `EngramOrigin::SelfReflection { parent_engram_id }`.
*/
id: string,
/**
* Engram category — episodic vs semantic vs procedural vs meta.
*/
kind: EngramKind,
/**
* The memorable content itself. v1 is plain text; later PRs may
* structure this further (e.g., `content: EngramContent` enum with
* variants for text / embedding / structured fact / etc.).
*/
content: string,
/**
* What kind of source this engram came from + the protocol-compatible
* reference fields needed to verify or re-locate it.
*/
origin: EngramOrigin,
/**
* Free-text recall keys / tags. v1 is unstructured strings; recall
* (later PR) may add embeddings or structured indexes alongside.
*/
recall_keys: Array<string>,
/**
* When this engram was admitted (epoch milliseconds UTC).
*/
admitted_at_ms: number,
/**
* The trust tier of the source AT ADMISSION TIME. Snapshot, not live —
* later trust changes don't retroactively rewrite this engram's
* recorded trust. A trust degradation across the polity creates new
* signal in introspection ("engrams admitted from peer X while their
* trust was high but is now low — re-evaluate").
*/
trust_state_at_admission: TrustState,
/**
* Optional pointer to the `CognitionTrace` SEAM record that explains
* WHY this engram was admitted. v1 carries an optional trace id
* string (the trace itself lives in the recorder); PR-2's IsMemorable
* Recipe will populate this. None = trace not recorded (acceptable
* for v1 manual admissions; should be Some for Recipe-driven
* admissions in PR-2+).
*/
admission_trace_id: string | null, };
19 changes: 19 additions & 0 deletions src/shared/generated/persona/EngramKind.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Engram categories (biological-memory analogs).
*
* `Episodic` — something happened (an interaction, an event, an observation).
* `Semantic` — a fact learned (a piece of knowledge separable from when/how
* it was learned).
* `Procedural` — a way to do things (a skill, a pattern, a heuristic).
* `SelfReflection` — meta-cognition: an engram ABOUT engrams or about the
* persona's own past decisions. The recursion that makes self-introspection
* possible (see `COGNITIVE-IMMUNE-MODEL.md` §3.9).
*
* Single-Engram-with-discriminator (vs separate-types-per-kind) is
* intentional: composes better, lets recall + admission share machinery
* across kinds, and the discriminator is cheap. Per the airc design
* discussion 2026-05-13.
*/
export type EngramKind = "Episodic" | "Semantic" | "Procedural" | "SelfReflection";
19 changes: 19 additions & 0 deletions src/shared/generated/persona/EngramOrigin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AircMessageRef } from "./AircMessageRef";
import type { ChatMessageRef } from "./ChatMessageRef";
import type { ToolInvocationRef } from "./ToolInvocationRef";

/**
* Where this engram came from.
*
* Variant-typed (vs generic `Provenance` interface) so each origin kind
* has its identity primitive present in the type. A consumer can
* pattern-match and KNOW that `EngramOrigin::Airc(reference)` carries
* the protocol-compatible reference fields — the type system enforces
* structure rather than relying on documentation.
*
* `SelfReflection` is the only origin without an external reference;
* it carries the parent engram id whose introspection produced this
* meta-engram.
*/
export type EngramOrigin = { "kind": "Airc", "ref": AircMessageRef } | { "kind": "Chat", "ref": ChatMessageRef } | { "kind": "Tool", "ref": ToolInvocationRef } | { "kind": "SelfReflection", "ref": { parent_engram_id: string, } };
26 changes: 26 additions & 0 deletions src/shared/generated/persona/ToolInvocationRef.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Reference to a tool invocation that produced this engram.
*/
export type ToolInvocationRef = {
/**
* Stable invocation id.
*/
invocation_id: string,
/**
* Tool name (e.g., "search", "calculator").
*/
tool_name: string,
/**
* When the tool was invoked (epoch ms UTC).
*/
invoked_at_ms: number,
/**
* SHA-256 of canonical input parameters.
*/
input_hash: string,
/**
* SHA-256 of canonical output. Reproducibility check anchor.
*/
output_hash: string, };
16 changes: 16 additions & 0 deletions src/shared/generated/persona/TrustState.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Trust tier of an engram's source at admission time.
*
* Models the SOURCE'S POLICY/TRUST POSITION, not which client implementation
* produced the data (per Joel 2026-05-13 + Codex relay). A high-quality
* third-party client signing valid envelopes from an approved peer
* produces `ApprovedPeer` trust; the official airc CLI from an
* unauthenticated stranger produces `Untrusted`. Trust is about the
* source's standing in the polity, not the bytes that carried the data.
*
* Ordered roughly from least to most trusted; `PartialOrd` derives so
* admission gates can compare `source_trust >= threshold` directly.
*/
export type TrustState = "Untrusted" | "Authenticated" | "Knocker" | "ApprovedPeer" | "IntragridMember" | "SocMember" | "SelfTrust";
12 changes: 12 additions & 0 deletions src/shared/generated/persona/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ export type { ActivateSkillResult } from './ActivateSkillResult';
export type { ActivityDomain } from './ActivityDomain';
export type { AdapterInfo } from './AdapterInfo';
export type { AdequacyResult } from './AdequacyResult';
export type { AdmissionDecision } from './AdmissionDecision';
export type { AdmissionDropReason } from './AdmissionDropReason';
export type { AdmissionError } from './AdmissionError';
export type { AircMessageRef } from './AircMessageRef';
export type { AllocationResult } from './AllocationResult';
export type { ChannelEnqueueRequest } from './ChannelEnqueueRequest';
export type { ChannelRegistryStatus } from './ChannelRegistryStatus';
export type { ChannelStatus } from './ChannelStatus';
export type { ChatMessageRef } from './ChatMessageRef';
export type { CleanedResponse } from './CleanedResponse';
export type { CognitionDecision } from './CognitionDecision';
export type { CompactionMetadata } from './CompactionMetadata';
Expand All @@ -19,6 +24,9 @@ export type { CorrectedToolCall } from './CorrectedToolCall';
export type { CoverageReport } from './CoverageReport';
export type { DomainActivity } from './DomainActivity';
export type { DomainClassification } from './DomainClassification';
export type { Engram } from './Engram';
export type { EngramKind } from './EngramKind';
export type { EngramOrigin } from './EngramOrigin';
export type { FullEvaluateRequest } from './FullEvaluateRequest';
export type { FullEvaluateResult } from './FullEvaluateResult';
export type { GarbageCheckResult } from './GarbageCheckResult';
Expand All @@ -38,6 +46,8 @@ export type { ModelSelectionResult } from './ModelSelectionResult';
export type { Mood } from './Mood';
export type { ParsedToolCall } from './ParsedToolCall';
export type { PersonaAllocation } from './PersonaAllocation';
export type { PersonaInboxFrame } from './PersonaInboxFrame';
export type { PersonaInboxFrameMetrics } from './PersonaInboxFrameMetrics';
export type { PersonaState } from './PersonaState';
export type { PriorityFactors } from './PriorityFactors';
export type { PriorityScore } from './PriorityScore';
Expand All @@ -50,6 +60,8 @@ export type { ServiceCycleResult } from './ServiceCycleResult';
export type { SleepMode } from './SleepMode';
export type { SocialSignals } from './SocialSignals';
export type { TextSimilarityResult } from './TextSimilarityResult';
export type { ToolInvocationRef } from './ToolInvocationRef';
export type { ToolParseRequest } from './ToolParseRequest';
export type { ToolParseResult } from './ToolParseResult';
export type { TrustState } from './TrustState';
export type { ValidationResult } from './ValidationResult';
Loading
Loading