Skip to main content

HarnessDecl

Struct HarnessDecl 

Source
pub struct HarnessDecl {
Show 22 fields pub id: String, pub name: String, pub speaker: Option<String>, pub locate: Locate, pub version_args: Vec<String>, pub tested: TestedDecl, pub caps: CapsDecl, pub models: Vec<ModelDecl>, pub efforts: Vec<String>, pub account_var: Option<String>, pub key_var: Option<String>, pub close_grace_ms: Option<u64>, pub framing: Option<String>, pub close_line: Option<String>, pub opens: bool, pub relaunches: bool, pub stderr_leaves_out: Vec<String>, pub memory: Option<MemoryDecl>, pub acp: Option<AcpDecl>, pub install: Option<InstallDecl>, pub update_command: Option<String>, pub writer: Option<String>,
}
Expand description

A harness as a manifest declares it (contributes.harnesses[]): all the core needs without starting the plugin (the welcome screen, the menus, the accounts, the memory).

Fields§

§id: String§name: String§speaker: Option<String>§locate: Locate

Its program: a path ({escouade}/… for one of the app’s), or names looked for on the PATH.

§version_args: Vec<String>§tested: TestedDecl§caps: CapsDecl§models: Vec<ModelDecl>§efforts: Vec<String>§account_var: Option<String>

The variable that gives each account its configuration folder.

§key_var: Option<String>

The variable that gives an account added by its key that key (CURSOR_API_KEY): the agent then goes by it, not by the machine’s sign-in (LaunchParams::by_key).

§close_grace_ms: Option<u64>

It does not end when its input is closed (Cursor CLI’s agent acp): it is killed that many milliseconds after.

§framing: Option<String>

What frames its messages on its input and output: lines when left out, contentLength for Content-Length headers (Copilot CLI’s server).

§close_line: Option<String>

A line written on its input just before it is closed (Copilot CLI’s runtime.shutdown, which saves its session).

§opens: bool

Its plugin opens the session over the protocol once it runs: the agent is ready at Item::Ready, not at its launch, and Item::Stop is its refusal.

§relaunches: bool

One agent has several programs in a row (Item::Relaunch, Item::Pause): it takes its settings at its launch alone, or has no way to stop a turn. Its end by itself is told to its plugin (method::PROGRAM_GONE).

§stderr_leaves_out: Vec<String>

The lines of its error output that hold one of these are not kept (what it logs of the account).

§memory: Option<MemoryDecl>

Where it keeps what it remembers of a project, offered once to the shared memory: a folder of files, with {configDir} and {projectKey} (the project’s path, every character but a letter or a digit a dash).

§acp: Option<AcpDecl>

A harness that speaks ACP, described: how the plugin dev.escouade.acp drives it (PLG-6). A plugin that only describes such a harness runs no program of its own.

§install: Option<InstallDecl>

How to install it, shown when it is not found.

§update_command: Option<String>

The command that updates it.

§writer: Option<String>

Who writes the texts it drafts (« rédigé par … »), its name when left out.

Trait Implementations§

Source§

impl Clone for HarnessDecl

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 HarnessDecl

Source§

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

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

impl<'de> Deserialize<'de> for HarnessDecl

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for HarnessDecl

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for HarnessDecl

Source§

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

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for HarnessDecl

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = !

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.