pub struct SystemSupervisorAdmission {
pub entry_dc: DcChar,
pub supervisor_revision_node_id: u128,
pub dependency_snapshot_node_ids: Vec<u128>,
pub accounting_version: u32,
pub compiled_limits: DcWasmResourceLimits,
pub effective_config_bytes: Vec<u8>,
}Expand description
Authenticated System supervisor bootstrap admission and compiled local resource counters.
The runtime supervisor is not an ordinary user document: it is instantiated only by the host
bootstrap entrypoint from an unpinned single-Short-Dc document whose active definition and
transitive dependency subgraph carry authenticated bundled System provenance. User quota
configuration is validated and compiled once at admission (or at an explicit task/step
boundary) into compact local integer counters (compiled_limits) so execution never reads
mutable graph state per instruction.
Fields§
§entry_dc: DcCharShort Dc entry point of the System supervisor base document.
supervisor_revision_node_id: u128Active System-block graph node ID holding the supervisor’s canonical decomposition.
dependency_snapshot_node_ids: Vec<u128>Sorted, deduplicated System-block node IDs in the supervisor’s transitive dependency snapshot.
accounting_version: u32Deterministic resource-accounting rule version (WASM_RESOURCE_ACCOUNTING_VERSION).
compiled_limits: DcWasmResourceLimitsCompiled local integer resource counters (clamped by emergency host watchdog bounds).
effective_config_bytes: Vec<u8>Canonical 76-byte serialized snapshot of compiled_limits recorded in execution traces.
Implementations§
Source§impl SystemSupervisorAdmission
impl SystemSupervisorAdmission
Sourcepub const EXECUTION_KERNEL_ENTRY_DC: DcChar = dc::DC_DC_DOCUMENT_EXECUTION_KERNEL
pub const EXECUTION_KERNEL_ENTRY_DC: DcChar = dc::DC_DC_DOCUMENT_EXECUTION_KERNEL
Canonical unpinned 1-Short-Dc bootstrap entry for the standalone Dc document execution
kernel (Dc 1936 "Dc document execution kernel").
Sourcepub const WORKSPACE_SUPERVISOR_ENTRY_DC: DcChar = dc::DC_COLLECTIVE_TOOLBOX_WORKSPACE
pub const WORKSPACE_SUPERVISOR_ENTRY_DC: DcChar = dc::DC_COLLECTIVE_TOOLBOX_WORKSPACE
Canonical unpinned 1-Short-Dc bootstrap entry for the full Collective Toolbox workspace
supervisor (Dc 1937 "Collective Toolbox Workspace").
Sourcepub fn admit_execution_kernel(
user_limits: DcWasmResourceLimits,
watchdog: DcWasmWatchdogLimits,
) -> Result<Self>
pub fn admit_execution_kernel( user_limits: DcWasmResourceLimits, watchdog: DcWasmWatchdogLimits, ) -> Result<Self>
Resolves and authenticates the standalone execution kernel (Dc 1936
"Dc document execution kernel") from the application-bundled System graph
(SeedGraphIndex::shared()), validates user_limits through the supervisor Dc-WASM
definition, and clamps emergency host watchdog bounds.
§Errors
Returns an error if loading the bundled System graph fails or user_limits is rejected.
Sourcepub fn admit_execution_kernel_default() -> Result<Self>
pub fn admit_execution_kernel_default() -> Result<Self>
Resolves and authenticates the standalone execution kernel (Dc 1936
"Dc document execution kernel") from the application-bundled System graph with default
resource and watchdog limits.
§Errors
Returns an error if loading or authenticating the bundled System supervisor fails.
Sourcepub fn admit_execution_kernel_from_graph_config(
seed_graph: &SeedGraphIndex,
user_config_node_id: u128,
watchdog: DcWasmWatchdogLimits,
) -> Result<Self>
pub fn admit_execution_kernel_from_graph_config( seed_graph: &SeedGraphIndex, user_config_node_id: u128, watchdog: DcWasmWatchdogLimits, ) -> Result<Self>
Resolves and validates a graph-backed user quota configuration node (user_config_node_id)
through the standalone execution kernel (Dc 1936 "Dc document execution kernel").
§Errors
Returns an error if the supervisor or configuration node cannot be resolved or validated.
Sourcepub fn admit_workspace_supervisor(
user_limits: DcWasmResourceLimits,
watchdog: DcWasmWatchdogLimits,
) -> Result<Self>
pub fn admit_workspace_supervisor( user_limits: DcWasmResourceLimits, watchdog: DcWasmWatchdogLimits, ) -> Result<Self>
Resolves and authenticates the full workspace supervisor (Dc 1937
"Collective Toolbox Workspace") from the application-bundled System graph
(SeedGraphIndex::shared()), validates user_limits through the supervisor Dc-WASM
definition, and clamps emergency host watchdog bounds.
§Errors
Returns an error if loading the bundled System graph fails or user_limits is rejected.
Sourcepub fn admit_workspace_supervisor_default() -> Result<Self>
pub fn admit_workspace_supervisor_default() -> Result<Self>
Resolves and authenticates the full workspace supervisor (Dc 1937
"Collective Toolbox Workspace") from the application-bundled System graph with default
resource and watchdog limits.
§Errors
Returns an error if loading or authenticating the bundled System supervisor fails.
Sourcepub fn admit_workspace_supervisor_from_graph_config(
seed_graph: &SeedGraphIndex,
user_config_node_id: u128,
watchdog: DcWasmWatchdogLimits,
) -> Result<Self>
pub fn admit_workspace_supervisor_from_graph_config( seed_graph: &SeedGraphIndex, user_config_node_id: u128, watchdog: DcWasmWatchdogLimits, ) -> Result<Self>
Resolves and validates a graph-backed user quota configuration node (user_config_node_id)
through the full workspace supervisor (Dc 1937 "Collective Toolbox Workspace").
§Errors
Returns an error if the supervisor or configuration node cannot be resolved or validated.
Sourcepub fn admit_from_bootstrap_tokens(
seed_graph: &SeedGraphIndex,
bootstrap_tokens: &[DcShorthand],
user_limits: DcWasmResourceLimits,
watchdog: DcWasmWatchdogLimits,
) -> Result<Self>
pub fn admit_from_bootstrap_tokens( seed_graph: &SeedGraphIndex, bootstrap_tokens: &[DcShorthand], user_limits: DcWasmResourceLimits, watchdog: DcWasmWatchdogLimits, ) -> Result<Self>
Resolves and authenticates the unpinned 1-Short-Dc System supervisor bootstrap document
from seed_graph, validates user_limits (executing the System supervisor Dc-WASM
definition when non-empty), clamps emergency host watchdog bounds,
and compiles the local integer counters and canonical config snapshot.
§Errors
Returns an error if bootstrap_tokens is pinned with Dc 641, contains multiple tokens
or a non-Short Dc, lacks authenticated bundled System provenance, or specifies an invalid
user_limits configuration.
Sourcepub fn admit_from_graph_config_node(
seed_graph: &SeedGraphIndex,
bootstrap_tokens: &[DcShorthand],
user_config_node_id: u128,
watchdog: DcWasmWatchdogLimits,
) -> Result<Self>
pub fn admit_from_graph_config_node( seed_graph: &SeedGraphIndex, bootstrap_tokens: &[DcShorthand], user_config_node_id: u128, watchdog: DcWasmWatchdogLimits, ) -> Result<Self>
Resolves and validates a graph-backed user quota configuration node (user_config_node_id)
through the trusted System supervisor bootstrap document (bootstrap_tokens).
§Errors
Returns an error if the supervisor bootstrap tokens fail provenance verification, if the graph configuration node is missing/retracted or malformed, or if the supervisor rejects the configuration.
Sourcepub fn encode_graph_quota_config_tokens(
limits: &DcWasmResourceLimits,
) -> Vec<DcShorthand>
pub fn encode_graph_quota_config_tokens( limits: &DcWasmResourceLimits, ) -> Vec<DcShorthand>
Encodes limits as a graph node token sequence (Dc 310 "Begin list" of 76 canonical
config bytes as DcChar::from_unicode, terminated by Dc 311 "End list").
Sourcepub fn decode_graph_quota_config_tokens(
tokens: &[DcShorthand],
) -> Result<DcWasmResourceLimits>
pub fn decode_graph_quota_config_tokens( tokens: &[DcShorthand], ) -> Result<DcWasmResourceLimits>
Decodes a graph-backed user quota configuration token sequence produced by
Self::encode_graph_quota_config_tokens.
§Errors
Returns an error if tokens is not a Dc 310..Dc 311 list of 76 canonical config bytes.
Sourcepub fn verify_ordinary_document_cannot_elevate(
ordinary_doc_tokens: &[DcShorthand],
_supervisor_entry_dc: DcChar,
) -> Result<()>
pub fn verify_ordinary_document_cannot_elevate( ordinary_doc_tokens: &[DcShorthand], _supervisor_entry_dc: DcChar, ) -> Result<()>
Verifies that an ordinary user document does not attempt to claim System supervisor privilege.
An ordinary document’s leading Dc 641 graph pin or reference to supervisor_entry_dc
is not an elevation attempt: valid pinned ordinary documents and ordinary documents
referencing supervisor_entry_dc execute normally without supervisor authority.
Actual attempts by an ordinary document to assert workspace supervisor role
(Dc 527 "Execution environment process role is workspace supervisor" = Dc 517 "Boolean true")
or inline bundled seed-graph provenance (Dc 635 = Dc 636) are denied.
§Errors
Returns an error if ordinary_doc_tokens explicitly claims supervisor privilege.
Sourcepub fn verify_ordinary_dc_document_cannot_elevate(
ordinary_doc: &DcMstr,
supervisor_entry_dc: DcChar,
) -> Result<()>
pub fn verify_ordinary_dc_document_cannot_elevate( ordinary_doc: &DcMstr, supervisor_entry_dc: DcChar, ) -> Result<()>
Verifies that a raw [DcMstr] ordinary document does not attempt to claim System
supervisor privilege.
§Errors
Returns an error if ordinary_doc contains an inline supervisor privilege claim.
Sourcepub fn scan_first_pin_description(
doc: &DcMstr,
resolver: &dyn SyntaxRuleResolver,
) -> Result<Option<(Vec<DcChar>, u128)>>
pub fn scan_first_pin_description( doc: &DcMstr, resolver: &dyn SyntaxRuleResolver, ) -> Result<Option<(Vec<DcChar>, u128)>>
Scans doc Dc-by-Dc (skipping escaped tokens, literal strings, identifiers, binary
payloads, and source comments) to locate the first unquoted [pin_description]
(Dc 641 System-block revision pin), returning (pin_tokens, pin_node_id).
§Errors
Returns an error if doc contains invalid DcTF bytes or a malformed [pin_description].
Sourcepub fn quote_dc_document_as_string_literal(
doc: &DcMstr,
resolver: &dyn SyntaxRuleResolver,
) -> Result<Vec<DcChar>>
pub fn quote_dc_document_as_string_literal( doc: &DcMstr, resolver: &dyn SyntaxRuleResolver, ) -> Result<Vec<DcChar>>
Quotes doc as a typed Dc [string] literal (Dc 260 "Begin literal value",
Dc 262 "Begin type definition", Dc 264 "Built-in type identifier: String",
Dc 263 "End type definition", escaped payload, Dc 261 "End literal value").
§Errors
Returns an error if doc contains malformed DcTF bytes.
Sourcepub fn admit_cli_execution_kernel() -> Result<Self>
pub fn admit_cli_execution_kernel() -> Result<Self>
Admits the Dc 1936 (Dc document execution kernel) supervisor with
bounded CLI compilation and execution quotas sufficient to self-host
StageR 3 (f1681) and StageL 3 (f1680) pipelines while still enforcing
deterministic compute, memory, and output limits.
§Errors
Returns an error if resolving or executing Dc 1936 fails.
Compiles an arbitrary executable Dc document doc into a Dc 1927..Dc 1928 Dc-WASM
program by evaluating [Dc 1938 <pin_description> [Dc 2608 <quoted_doc>]] (or unpinned
[Dc 2608 <quoted_doc>]) under shared_quota, ensuring compilation runs under the
exact same resource quotas as target execution.
§Errors
Returns an error if doc attempts privilege elevation, fails pin/converter resolution,
traps during compilation, or exhausts shared_quota.
Trait Implementations§
Source§impl Clone for SystemSupervisorAdmission
impl Clone for SystemSupervisorAdmission
Source§fn clone(&self) -> SystemSupervisorAdmission
fn clone(&self) -> SystemSupervisorAdmission
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SystemSupervisorAdmission
impl Debug for SystemSupervisorAdmission
impl Eq for SystemSupervisorAdmission
impl StructuralPartialEq for SystemSupervisorAdmission
Auto Trait Implementations§
impl Freeze for SystemSupervisorAdmission
impl RefUnwindSafe for SystemSupervisorAdmission
impl Send for SystemSupervisorAdmission
impl Sync for SystemSupervisorAdmission
impl Unpin for SystemSupervisorAdmission
impl UnwindSafe for SystemSupervisorAdmission
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
impl<T, U> ExactFrom<T> for Uwhere
U: TryFrom<T>,
fn exact_from(value: T) -> U
§impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
impl<T, U> ExactInto<U> for Twhere
U: ExactFrom<T>,
fn exact_into(self) -> U
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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§impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
impl<T, U> OverflowingInto<U> for Twhere
U: OverflowingFrom<T>,
fn overflowing_into(self) -> (U, bool)
§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the foreground set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red() and
green(), which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg():
use yansi::{Paint, Color};
painted.fg(Color::White);Set foreground color to white using white().
use yansi::Paint;
painted.white();§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self with the background set to
value.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red() and
on_green(), which have the same functionality but
are pithier.
§Example
Set background color to red using fg():
use yansi::{Paint, Color};
painted.bg(Color::Red);Set background color to red using on_red().
use yansi::Paint;
painted.on_red();§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling [Attribute] value.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold() and
underline(), which have the same functionality
but are pithier.
§Example
Make text bold using attr():
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);Make text bold using using bold().
use yansi::Paint;
painted.bold();§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi [Quirk] value.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask() and
wrap(), which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk():
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);Enable wrapping using wrap().
use yansi::Paint;
painted.wrap();§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting() due to conflicts with Vec::clear().
The clear() method will be removed in a future release.§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the [Condition] value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted only when both stdout and stderr are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);