Skip to main content

LoadedProject

Struct LoadedProject 

Source
pub(crate) struct LoadedProject {
Show 15 fields pub name: String, pub path: PathBuf, pub display_path: String, pub org: String, pub accounts: Vec<String>, pub fallback_accounts: Vec<String>, pub model: Option<String>, pub env: HashMap<String, String>, pub env_file: Option<String>, pub max_workers: Option<usize>, pub permission_mode: PermissionMode, pub document_roots: Vec<PathBuf>, pub handoff: Option<HandoffSettings>, pub browser_profile: ProfileKey, pub slack_workspace: Option<String>,
}

Fields§

§name: String§path: PathBuf§display_path: String

Original path string from forge.toml, preserved for display (e.g. ~/Projects/forge with ~ un-expanded). Use path for filesystem access; this for human-readable output.

§org: String

Name of the org this project belongs to (matches LoadedOrg.name). The spawn resolves the org’s pin and walk order through this back-reference.

§accounts: Vec<String>

Cached pinned account list from the project’s org. Duplicated here so callers don’t need to walk the org list on every resolution.

§fallback_accounts: Vec<String>

Cached fallback list from the project’s org, alongside accounts. Absent key -> empty.

§model: Option<String>

The project’s model: fills the CLI’s model slots at spawn (ANTHROPIC_DEFAULT_*_MODEL, ANTHROPIC_SMALL_FAST_MODEL, CLAUDE_CODE_SUBAGENT_MODEL) and is the model the walk matches accounts on. A project that declares none cannot spawn.

§env: HashMap<String, String>

Per-project environment from the entry’s env table, layered over the account’s env at spawn. An ANTHROPIC_BASE_URL or ANTHROPIC_AUTH_TOKEN here desyncs forge’s own accounting - the usage probe and the selection walk both read the ACCOUNT map, so they measure a different endpoint.

§env_file: Option<String>

The env_file path the entry declared, kept for the settings page; its entries are already folded into env.

§max_workers: Option<usize>

Cap on this project’s live dynamic workers; None keeps the default. See ProjectEntry::max_workers.

§permission_mode: PermissionMode

CLI permission mode stamped onto every session this project spawns. Resolved once at load; absent key resolves to auto.

§document_roots: Vec<PathBuf>

The extra roots the document read accepts beyond a session’s own tree: the entry’s document_roots with ~ expanded. Empty for a project that declares none.

§handoff: Option<HandoffSettings>

This project’s handoff table, unresolved; None inherits the top-level one entirely.

§browser_profile: ProfileKey

The browser profile this project’s sessions drive: the project’s override, else the org’s, else <org>/default.

§slack_workspace: Option<String>

The [[slack]] label this project’s sessions act in: the project’s binding, else the org’s. None leaves the Slack tools refusing with the key to add.

Trait Implementations§

Source§

impl Clone for LoadedProject

Source§

fn clone(&self) -> Self

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 LoadedProject

Hand-written because a project’s env may carry secrets (env_file exists so one can live outside forge.toml), which the derived output would print.

Source§

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

Formats the value using the given formatter. 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
§

impl<T> Any for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

§

fn type_name(&self) -> &'static str

§

impl<T> AnySync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send> ⓘ

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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
§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,

Source§

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

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<S> FromSample<S> for S

§

fn from_sample_(s: S) -> S

§

impl<T> Instrument for T

§

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

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

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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

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

§

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
§

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
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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
§

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

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