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
14 changes: 14 additions & 0 deletions src/shared/generated/runtime/ArtifactKey.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* Stable identifier for an artifact stream. Producer-side modules
* declare a key when they publish; consumer-side modules name a key
* when they subscribe.
*
* Format convention (not enforced): `<module>/<surface>.<event>`. E.g.
* `paging/broker.snapshot`, `cognition/rate_proposals.result`,
* `inference_capability/registry.peer_announced`. The runtime does
* not parse the structure — it's a string match. Convention is for
* humans reading subscription lists, not the dispatcher.
*/
export type ArtifactKey = string;
17 changes: 17 additions & 0 deletions src/shared/generated/runtime/ArtifactSelector.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ArtifactKey } from "./ArtifactKey";

/**
* What a subscriber wants to be notified about.
*
* `Exact` — match one specific `ArtifactKey` (the common case).
* `Prefix` — match every key starting with a string (e.g. a persona
* module wanting every `cognition/*` artifact).
*
* Glob/regex deliberately omitted: the matcher is the hot path the
* runtime walks every publish, and string-prefix is cheap + covers
* the cases we have. If a future module needs glob, it can compose
* `Prefix` + filter in its own handler — keeps the matcher fast for
* the 99% case.
*/
export type ArtifactSelector = { "kind": "exact", "value": ArtifactKey } | { "kind": "prefix", "value": string };
36 changes: 36 additions & 0 deletions src/shared/generated/runtime/Cadence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.

/**
* How the runtime should drive a module's work surface. PR-2 adds
* this as an Optional field on `ModuleConfig`; modules that don't
* declare a cadence keep their current behavior (purely reactive to
* commands and events).
*
* `Periodic(Duration)` — broker-paced tick at the given interval. The
* runtime calls `tick()` at this cadence. Duration is the requested
* floor — broker can stretch under pressure (no hardcoded ceiling
* anywhere; broker decides per pressure state).
*
* `EventDriven` — woken only when one of the module's
* `event_subscriptions` fires. No periodic call. Lowest overhead
* for modules that genuinely have nothing to do until something
* external happens.
*
* `OnArtifact` — woken when an artifact this module subscribes to is
* published. Composes with subscriptions: subscriber list lives in
* `ModuleConfig.artifact_subscriptions` (PR-2); cadence says "wake
* me on those subscriptions, otherwise rest."
*
* `Mixed` — periodic tick AND artifact wakes. For modules that
* need a heartbeat (e.g. cache TTL eviction) plus reactive bursts.
*
* Deliberately no `OnDemand` / `Manual` variant. Every supervised
* task has a cadence policy the supervisor knows; a module that
* truly never wakes shouldn't exist as a registered module.
*/
export type Cadence = { "kind": "periodic",
/**
* Requested floor on tick interval. ms over the wire so the
* TS side doesn't have to handle bigint Duration shape.
*/
intervalMs: number, } | { "kind": "eventDriven" } | { "kind": "onArtifact" } | { "kind": "mixed", intervalMs: number, };
3 changes: 3 additions & 0 deletions src/shared/generated/runtime/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// Source: generator/generate-rust-bindings.ts
// Re-generate: npx tsx generator/generate-rust-bindings.ts

export type { ArtifactKey } from './ArtifactKey';
export type { ArtifactSelector } from './ArtifactSelector';
export type { Cadence } from './Cadence';
export type { ChannelTickConfig } from './ChannelTickConfig';
export type { CommandTiming } from './CommandTiming';
export type { ModuleInfo } from './ModuleInfo';
Expand Down
Loading
Loading