Skip to main content

IRProgram

Struct IRProgram 

Source
pub struct IRProgram {
Show 60 fields pub node_type: &'static str, pub source_line: u32, pub source_column: u32, pub personas: Vec<IRPersona>, pub contexts: Vec<IRContext>, pub anchors: Vec<IRAnchor>, pub tools: Vec<IRToolSpec>, pub memories: Vec<IRMemory>, pub types: Vec<IRType>, pub flows: Vec<IRFlow>, pub runs: Vec<IRRun>, pub imports: Vec<IRImport>, pub agents: Vec<IRAgent>, pub shields: Vec<IRShield>, pub windows: Vec<IRWindow>, pub budgets: Vec<IRBudget>, pub daemons: Vec<IRDaemon>, pub ots_specs: Vec<IROts>, pub pix_specs: Vec<IRPix>, pub ledger_specs: Vec<IRLedger>, pub corpus_specs: Vec<IRCorpus>, pub psyche_specs: Vec<IRPsyche>, pub mandate_specs: Vec<IRMandate>, pub lambda_data_specs: Vec<IRLambdaData>, pub compute_specs: Vec<IRCompute>, pub axonstore_specs: Vec<IRAxonStore>, pub endpoints: Vec<IRAxonEndpoint>, pub extensions: Vec<IRExtension>, pub dataspace_specs: Vec<IRDataspace>, pub resources: Vec<IRResource>, pub fabrics: Vec<IRFabric>, pub manifests: Vec<IRManifest>, pub observations: Vec<IRObserve>, pub intention_tree: Option<IRIntentionTree>, pub reconciles: Vec<IRReconcile>, pub leases: Vec<IRLease>, pub ensembles: Vec<IREnsemble>, pub sessions: Vec<IRSession>, pub topologies: Vec<IRTopology>, pub immunes: Vec<IRImmune>, pub reflexes: Vec<IRReflex>, pub heals: Vec<IRHeal>, pub components: Vec<IRComponent>, pub views: Vec<IRView>, pub channels: Vec<IRChannel>, pub sockets: Vec<IRSocket>, pub observables: Vec<IRObservable>, pub witnesses: Vec<IRWitness>, pub upstreams: Vec<IRUpstream>, pub cors_policies: Vec<IRCors>, pub caches: Vec<IRCache>, pub credentials: Vec<IRCredential>, pub savants: Vec<IRSavant>, pub documents: Vec<IRDocument>, pub deliveries: Vec<IRDeliver>, pub notifications: Vec<IRNotify>, pub synths: Vec<IRSynth>, pub scopes: Vec<IRScope>, pub effects: Vec<IREffectDeclaration>, pub modules: Vec<IRModuleProvenance>,
}
Expand description

§Fase 112.b — Clone is additive and every member IR type already derives it. The Cognitive-I/O supervisor owns the compiled program it drives (it outlives the deploy call that built it), and a lifetime-bound supervisor would have to be threaded through ServerState for no benefit.

Fields§

§node_type: &'static str§source_line: u32§source_column: u32§personas: Vec<IRPersona>§contexts: Vec<IRContext>§anchors: Vec<IRAnchor>§tools: Vec<IRToolSpec>§memories: Vec<IRMemory>§types: Vec<IRType>§flows: Vec<IRFlow>§runs: Vec<IRRun>§imports: Vec<IRImport>§agents: Vec<IRAgent>§shields: Vec<IRShield>§windows: Vec<IRWindow>

§Fase 71.a — temporal execution-window guards.

§budgets: Vec<IRBudget>

§Fase 114.a — top-level budget declarations. A daemon’s anonymous budget stays on the daemon; these govern EVERY flow that calls the tools they name, including the HTTP endpoints adopters actually deploy.

§daemons: Vec<IRDaemon>§ots_specs: Vec<IROts>§pix_specs: Vec<IRPix>§ledger_specs: Vec<IRLedger>

§Fase 62.0 — audit-chain (ledger) declarations. Distinct from pix_specs (the retrieval navigator); a ledger binds a hash-linked recorder to an audited surface.

§corpus_specs: Vec<IRCorpus>§psyche_specs: Vec<IRPsyche>§mandate_specs: Vec<IRMandate>§lambda_data_specs: Vec<IRLambdaData>§compute_specs: Vec<IRCompute>§axonstore_specs: Vec<IRAxonStore>§endpoints: Vec<IRAxonEndpoint>§extensions: Vec<IRExtension>

§Fase 53 — closed-catalog extension declarations (compiled). #[serde(skip)] so the field is NOT emitted into the IR JSON — this keeps the static IR-JSON drift-gate fixtures green without regenerating them (the pattern dataspace_specs also used until §108.b un-skipped it). The in-memory field feeds the §53.c type-checker + §53.d PCC (both read &IRProgram); soundness invariant #1 holds via SOURCE re-derivation — both the prover and the verifier read the source-derived IR, which carries the extensions. §53.x hardening (optional): un-skip + regenerate fixtures + bind extensions into the PCC artifact_digest (today the digest omits them; the witness still binds them by re-derivation). Deterministically sorted by name at the end of IR generation (§53.b founder refinement B) so multi-file declaration order can never perturb the proof-bundle hash.

§dataspace_specs: Vec<IRDataspace>

§Fase 108.b — the compiled dataspace schemas, SERIALIZED into the IR JSON (un-skipped). History: this field was #[serde(skip)] for byte-identical parity with the retired Python reference frontend (§8.2.h.1) — which meant the runtime literally could not see a declared dataspace (the §108 ground-truth finding). The parity constraint is gone; the deploy hook walks this field to instantiate the deterministic columnar engine’s stores. Additive for consumers: no IR deserializer uses deny_unknown_fields (verified 2026-07-12), and IRProgram is Serialize-only — consumers re-derive from source.

§resources: Vec<IRResource>

§λ-L-E Fase 1 — I/O cognitivo primitives (compiled).

§fabrics: Vec<IRFabric>§manifests: Vec<IRManifest>§observations: Vec<IRObserve>§intention_tree: Option<IRIntentionTree>

§λ-L-E Fase 1 (Free Monad root) — populated when the program declares manifests/observes. None ⇒ serialises as null (matches Python when the field is None).

§reconciles: Vec<IRReconcile>

§λ-L-E Fase 3 — Control cognitivo primitives (compiled).

§leases: Vec<IRLease>§ensembles: Vec<IREnsemble>§sessions: Vec<IRSession>

§λ-L-E Fase 4 — Topology + Session (compiled).

§topologies: Vec<IRTopology>§immunes: Vec<IRImmune>

§λ-L-E Fase 5 — Immune system (compiled).

§reflexes: Vec<IRReflex>§heals: Vec<IRHeal>§components: Vec<IRComponent>

§λ-L-E Fase 9 — UI cognitiva declarativa (compiled).

§views: Vec<IRView>§channels: Vec<IRChannel>

§λ-L-E Fase 13 — Mobile typed channels (compiled).

§sockets: Vec<IRSocket>

§Fase 41.b — typed WebSocket transports (compiled). Each carries its referenced session protocol + the credit-window backpressure so axon-rs can realise the typed endpoint over a tokio WebSocket.

§observables: Vec<IRObservable>

§Fase 51.c.2 — Pauli-sum observable declarations (compiled). Each carries its real-coefficient × Pauli-string terms so axon-rs can build the Hermitian measurement operator M = Σ cₖ Pₖ a quant block measures against. #[serde(skip)] (like extensions / dataspace_specs) so the static IR-JSON drift fixtures stay green; the in-memory field feeds the §51.c.2 checker + the §51.d/e runtime. The checker resolves quant(observable: …) against the AST symbol table, not this field.

§witnesses: Vec<IRWitness>

§Fase 69.a — Advantage-Witness declarations. skip_serializing_if = empty keeps a witness-less program’s IR JSON byte-identical (zero IR-SHA drift, the §52/§67 pattern); when present it rides the IR to the enterprise deploy/runtime evaluator (§69.b+).

§upstreams: Vec<IRUpstream>

§Fase 80.b — outbound vendor connections (compiled). Each carries its axon-facing session binding (protocol/role), the per-tenant config keys (resolve/secret), the auth handshake, the total wire↔session projection (map) and the reconnect/overflow policies, so axon-rs can dial + transcode without vendor-specific code. skip_serializing_if = empty keeps an upstream-less program’s IR JSON byte-identical (zero IR-SHA drift — the standing §76.d discipline).

§cors_policies: Vec<IRCors>

§Fase 83.a — named, referenced browser-origin policies. skip_serializing_if = empty keeps a cors-less program’s IR JSON byte-identical (zero IR-SHA drift — the standing §76.d discipline).

§caches: Vec<IRCache>

§Fase 85.b — named, referenced result-memoization policies. Same skip_serializing_if = empty IR-SHA discipline as cors_policies.

§credentials: Vec<IRCredential>

§Fase 92.a — ephemeral-credential contracts (credential { ttl: grants: }), minted at runtime by the mint flow verb under the attenuation law (authority_only_attenuates). Same skip_serializing_if = empty IR-SHA discipline.

§savants: Vec<IRSavant>

§Fase 87.a — long-horizon autonomous research primitives (compiled). Each carries its domain, cognition params, memory binding, compute budget and mandates so the enterprise engine (§87.h+) can drive the active-inference loop. Same skip_serializing_if = empty IR-SHA discipline as caches (a savant-less program’s IR JSON stays byte-identical — zero drift).

§documents: Vec<IRDocument>

§Fase 99.b — compiled document declarations. Same skip_serializing_if = empty IR-SHA discipline (a document-less program’s IR JSON stays byte-identical). Consumed by the runtime DocumentRenderer tool + the DocumentProvenanceSoundness PCC class.

§deliveries: Vec<IRDeliver>

§Fase 105 — compiled CRM delivery declarations. Same skip_serializing_if = empty IR-SHA discipline (a delivery-less program’s IR JSON stays byte-identical). Consumed by the runtime delivery dispatch (axon::delivery) + the DeliveryProvenanceSoundness PCC class (T920).

§notifications: Vec<IRNotify>

§Fase 110 — governed human notifications (the third egress dual).

§synths: Vec<IRSynth>

§Fase 87.d — dynamic tool-synthesis policies (compiled). Same skip_serializing_if = empty IR-SHA discipline as savants.

§scopes: Vec<IRScope>

§Fase 88.a — authorization-scope policies (compiled). Same skip_serializing_if = empty IR-SHA discipline as synths.

§effects: Vec<IREffectDeclaration>

§Fase 23 — algebraic effect declarations (compiled). Each declared effect persists into IR so axon-rs can build the per-effect operation table at startup. The CPS state graph for perform/handle sites lives inline within IRFlow.steps (each IRPerform / IRHandlerFrame carries its assigned state_id / frame_id).

This Rust port mirrors the Python-side IRProgram.effects: tuple[IREffectDeclaration, ...] field so the byte-identical structural-parity gate stays green. The Rust frontend (axon-frontend) does not yet emit Fase 23 IR itself — the field exists to preserve serialization shape; the actual algebraic-effects compiler lives on the Python side, and the Rust runtime (axon-rs/src/effects/) consumes the JSON IR emitted by Python.

§modules: Vec<IRModuleProvenance>

§Fase 115.e — per-module provenance of a LINKED program: for every module the linker merged, its path, origin file, both EMS hashes and the virtual-line window its declarations occupy (the driver renumbers each module’s lines by a base offset so diagnostics and IR source_lines stay globally unambiguous — map back with line − line_base). skip_serializing_if = empty keeps every single-file program’s IR JSON byte-identical (zero IR-SHA drift — the standing §76.d discipline).

Implementations§

Trait Implementations§

Source§

impl Clone for IRProgram

Source§

fn clone(&self) -> IRProgram

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IRProgram

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Serialize for IRProgram

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

Source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more