#[non_exhaustive]pub struct RevisionHostOptions { /* private fields */ }Expand description
What the embedding HOST decides for one revision, beyond its pinned packs.
Default is exactly TenantRuntime::load_revision’s behaviour.
Non-exhaustive so a later host seam is an additive field, not a breaking
change: construct with RevisionHostOptions::default() plus the with_*
setters.
Implementations§
Source§impl RevisionHostOptions
impl RevisionHostOptions
Sourcepub fn with_billing_meter(
self,
meter: Arc<dyn BillingMeter>,
) -> RevisionHostOptions
pub fn with_billing_meter( self, meter: Arc<dyn BillingMeter>, ) -> RevisionHostOptions
Record this unit’s agentic-worker LLM usage through meter as well —
see TenantRuntime::load_revision_with for how it combines with the
env-configured cloud-commerce sink.
Sourcepub fn with_run_outcome_sink(
self,
sink: Arc<dyn RunOutcomeSink>,
) -> RevisionHostOptions
pub fn with_run_outcome_sink( self, sink: Arc<dyn RunOutcomeSink>, ) -> RevisionHostOptions
Report one crate::run_outcome::RunOutcome per flow turn of this
unit through sink — the deployed run audit. greentic-start installs a
crate::run_outcome::HttpRunOutcomeSink built from the same staged
metering block as the billing meter. Without one, flow execution and
the persisted resume state are unchanged.
Sourcepub fn with_approval_inbox(
self,
target: ApprovalInboxTarget,
) -> RevisionHostOptions
pub fn with_approval_inbox( self, target: ApprovalInboxTarget, ) -> RevisionHostOptions
File this unit’s human approvals with the admin’s HTTP approval inbox
and poll for the decisions, instead of needing a NATS broker — the
HTTP approval rail (greentic-designer
docs/superpowers/specs/2026-09-29-approval-rail-http-design.md).
greentic-start builds the target from the same staged metering
block as the run-outcome sink.
Serves ONLY approval.call: it goes into the engine’s own approval
slot, so sorla.call still fails with sorla_route_missing on a lane
with no broker. When GREENTIC_EVENTS_NATS_URL also connects, NATS
wins and the inbox is not installed. A target that fails validation
(blank field, cleartext URL off loopback) is logged and skipped; the
runtime loads either way, and an approval that needs a human then fails
at the node as it did before. Validate early with
crate::runner::approval_http::HttpApprovalDispatcher::new.
Sourcepub fn with_user_ledger(self, target: UserLedgerTarget) -> RevisionHostOptions
pub fn with_user_ledger(self, target: UserLedgerTarget) -> RevisionHostOptions
Read and append this unit’s user ledger (shared context, Phase C) at
the admin’s ledger door. greentic-start builds the target from the same
staged metering block as the approval inbox: base_url is the
worker-usage endpoint with its last segment swapped for ledger,
token the unit’s metering token, tenant_slug the block’s slug. The
runner never reads that block itself.
Nothing happens unless a pack also names an agent in
assets/user-ledger.json, and only a turn whose caller the provider
verified, outside any tool call, touches the ledger. That sidecar alone
decides read versus read_write for the pack’s own agents: there is
no host-side ceiling on the mode. The gates are the door token’s
ledger purpose (the admin refuses a token without it), the
GREENTIC_AW_USER_LEDGER kill switch, the tenant match between the
runtime and the turn, and a provider-verified subject. A target that
fails validation (blank field, cleartext URL off loopback, userinfo in
the URL) is one warning and the runtime loads without the ledger;
validate early with
greentic_aw_runtime::user_ledger::HttpUserLedger::new. The admin
refuses a token without the ledger purpose, and the client then
stops asking for a while. GREENTIC_AW_USER_LEDGER=0 turns it off.
Sourcepub fn with_artifact_reader(
self,
reader: Arc<dyn ArtifactReader>,
) -> RevisionHostOptions
pub fn with_artifact_reader( self, reader: Arc<dyn ArtifactReader>, ) -> RevisionHostOptions
Open this unit’s message attachments through reader (contract C3 get
on the admin artifacts door). greentic-start builds it from the same
staged metering block as the other door targets, with the door base
sibling_door(endpoint, "artifacts") and the unit’s metering token: the
token is this unit’s, so the door reads only this unit’s tenant.
Per REVISION rather than a HostBuilder setting for the same reason as
the billing meter: one greentic-start process serves every unit, and
each unit has its own token. Without one the unit has NO reader: the
GREENTIC_ARTIFACT_* env variables are never read on this path, even
when a HostBuilder opted in to the env fallback (they would hand every
unit of the process one token). Each attachment is
then a fixed notice to the agent and the turn still runs. Only the
multi-provider backend (greentic-llm-backend) reads attachments.
Sourcepub fn with_ext_artifact_port(
self,
port: Arc<dyn ArtifactPort>,
) -> RevisionHostOptions
pub fn with_ext_artifact_port( self, port: Arc<dyn ArtifactPort>, ) -> RevisionHostOptions
Store the files this unit’s extensions create (host.artifact.put,
contract C3 put) through port. greentic-start builds it per unit,
over that unit’s own door and token, like
Self::with_artifact_reader.
Per REVISION for the same reason: one process serves every unit, each
with its own token. Without one the unit has NO port: the
GREENTIC_ARTIFACT_* env variables are never read on this path, and an
extension’s put answers unsupported.
Trait Implementations§
Source§impl Clone for RevisionHostOptions
impl Clone for RevisionHostOptions
Source§fn clone(&self) -> RevisionHostOptions
fn clone(&self) -> RevisionHostOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RevisionHostOptions
impl Debug for RevisionHostOptions
Source§impl Default for RevisionHostOptions
impl Default for RevisionHostOptions
Source§fn default() -> RevisionHostOptions
fn default() -> RevisionHostOptions
Auto Trait Implementations§
impl !RefUnwindSafe for RevisionHostOptions
impl !UnwindSafe for RevisionHostOptions
impl Freeze for RevisionHostOptions
impl Send for RevisionHostOptions
impl Sync for RevisionHostOptions
impl Unpin for RevisionHostOptions
impl UnsafeUnpin for RevisionHostOptions
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request