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
451 changes: 451 additions & 0 deletions src/docs/architecture/ALPHA-GAP-RUST-PERSONA-RUNTIME.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/shared/generated/cognition/AdaptiveThroughputPlan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ThroughputJob } from "./ThroughputJob";

export type AdaptiveThroughputPlan = { admitted: Array<ThroughputJob>, deferredMissingDependencies: Array<ThroughputJob>, deferredResourcePressure: Array<ThroughputJob>, droppedStale: Array<ThroughputJob>, droppedSuperseded: Array<ThroughputJob>, };
5 changes: 5 additions & 0 deletions src/shared/generated/cognition/AdaptiveThroughputRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ThroughputJob } from "./ThroughputJob";
import type { ThroughputLaneBudget } from "./ThroughputLaneBudget";

export type AdaptiveThroughputRequest = { readyArtifactKeys: Array<string>, laneBudgets: Array<ThroughputLaneBudget>, jobs: Array<ThroughputJob>, nowMs: number, };
2 changes: 1 addition & 1 deletion src/shared/generated/cognition/PersonaTurnPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/**
* Persona-specific work item for the turn.
*/
export type PersonaTurnPlan = { personaId: string, displayName: string, specialty: string, model: string, provider: string, localModel: boolean, generationOrder: number, personaContextKey: string, ragCacheKey: string, inputBudgetTokens: number, maxOutputTokens: number, sourceNames: Array<string>, };
export type PersonaTurnPlan = { personaId: string, displayName: string, specialty: string, model: string, provider: string, localModel: boolean, generationOrder: number, generationWave: number, personaContextKey: string, ragCacheKey: string, inputBudgetTokens: number, maxOutputTokens: number, estimatedStartMs: number, estimatedFinishMs: number, sourceNames: Array<string>, };
2 changes: 1 addition & 1 deletion src/shared/generated/cognition/RecipeTurnBatchPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import type { SharedRagSourcePlan } from "./SharedRagSourcePlan";
/**
* Result of `cognition/plan-turn-batch`.
*/
export type RecipeTurnBatchPlan = { turnKey: string, roomId: string, messageId?: string, queryText: string, sharedSources: Array<SharedRagSourcePlan>, personaPlans: Array<PersonaTurnPlan>, skippedDuplicatePersonaIds: Array<string>, maxConcurrentLocalGenerations: number, };
export type RecipeTurnBatchPlan = { turnKey: string, roomId: string, messageId?: string, queryText: string, sharedSources: Array<SharedRagSourcePlan>, personaPlans: Array<PersonaTurnPlan>, skippedDuplicatePersonaIds: Array<string>, maxConcurrentLocalGenerations: number, estimatedFirstResponseMs: number, estimatedAllResponsesMs: number, meetsFirstResponseBudget: boolean, meetsAllResponsesBudget: boolean, };
19 changes: 18 additions & 1 deletion src/shared/generated/cognition/RecipeTurnBatchRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,21 @@ export type RecipeTurnBatchRequest = { trigger: RecipeTurnTrigger, personas: Arr
* Total input-token budget for shared RAG planning. Per-persona
* generation still uses each candidate's model limits.
*/
totalInputBudgetTokens: number, };
totalInputBudgetTokens: number,
/**
* Local inference lanes available for this turn. Zero means unknown,
* treated as one lane. The host should pass `inference/capacity` here
* so the planner, admission control, and runtime scheduler share the
* same source of truth.
*/
localInferenceCapacity: number,
/**
* Visible-response budget for the first local persona reply. Zero means
* use the alpha gate default.
*/
firstResponseBudgetMs: number,
/**
* Visible-response budget for every admitted persona to either respond
* or emit a silence reason. Zero means use the alpha gate default.
*/
allResponsesBudgetMs: number, };
3 changes: 3 additions & 0 deletions src/shared/generated/cognition/ResourceClass.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type ResourceClass = "CPU" | "DATA" | "GPU" | "EMBEDDING" | "LOCAL_GENERATION" | "CLOUD_PROVIDER" | "IO" | "MEDIA" | "RENDER" | "MEMORY" | "BACKGROUND";
3 changes: 3 additions & 0 deletions src/shared/generated/cognition/TargetSilicon.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

export type TargetSilicon = "CPU" | "GPU" | "UNIFIED_MEMORY" | "NETWORK" | "DISK" | "CLOUD" | "BACKGROUND";
9 changes: 9 additions & 0 deletions src/shared/generated/cognition/ThroughputJob.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ResourceClass } from "./ResourceClass";
import type { TargetSilicon } from "./TargetSilicon";

export type ThroughputJob = { jobId: string, artifactKey: string, resourceClass: ResourceClass, targetSilicon: TargetSilicon, priority: number, costUnits: number, dependencyKeys: Array<string>, createdAtMs: number,
/**
* Zero means never stale.
*/
staleAfterMs: number, };
10 changes: 10 additions & 0 deletions src/shared/generated/cognition/ThroughputLaneBudget.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.
import type { ResourceClass } from "./ResourceClass";
import type { TargetSilicon } from "./TargetSilicon";

export type ThroughputLaneBudget = {
/**
* Semantic owner for observability. Admission is keyed by target_silicon
* so LocalGeneration, Media, and Render can share one physical GPU budget.
*/
resourceClass: ResourceClass, targetSilicon: TargetSilicon, maxConcurrency: number, maxCostUnits: number, };
Loading
Loading