pub enum Command {
Show 70 variants
Prompt {
key: SessionSlot,
text: String,
attachments: Vec<ImageAttachment>,
},
PromptUnder {
key: SessionSlot,
text: String,
attachments: Vec<ImageAttachment>,
uuid: String,
source: PromptSource,
dispatch_id: Option<u64>,
},
Cancel {
key: SessionSlot,
},
CancelQueuedPrompt {
key: SessionSlot,
uuid: String,
},
ReadCallOutput {
key: SessionSlot,
call_id: String,
},
SetMode {
key: SessionSlot,
mode: PermissionMode,
},
SetModel {
key: SessionSlot,
model: String,
},
NewSession {
key: SessionSlot,
cwd: String,
launch_settings: SessionLaunchSettings,
session_id: Option<String>,
},
ResumeSession {
key: SessionSlot,
session_id: String,
cwd: String,
launch_settings: SessionLaunchSettings,
},
Handoff {
key: SessionSlot,
brief: Option<String>,
},
RespondPermission {
key: SessionSlot,
tool_id: String,
outcome: PermissionOutcome,
},
RespondSlackPost {
key: SessionSlot,
id: Uuid,
answer: SlackDraftAnswer,
},
RespondBrowserHandOff {
key: SessionSlot,
id: Uuid,
answer: HandOffAnswer,
},
RespondTerminalHandOff {
key: SessionSlot,
id: Uuid,
answer: HandOffAnswer,
},
AnswerDocumentHandOff {
key: SessionSlot,
id: Uuid,
answer: DocumentHandOffEnding,
},
RespondSettingsWrite {
key: SessionSlot,
id: Uuid,
approved: bool,
},
RespondVaultAsk {
key: SessionSlot,
id: Uuid,
answer: VaultAskAnswer,
},
BiometricEnrol {
enrolment: Uuid,
device: String,
purpose: String,
blob: String,
respond: Option<Sender<bool>>,
},
BiometricRewrite {
enrolment: Uuid,
purpose: String,
blob: String,
respond: Option<Sender<bool>>,
},
BiometricRelease {
enrolment: Uuid,
purpose: String,
respond: Option<Sender<Option<BiometricBlob>>>,
},
BiometricRevoke {
enrolment: Uuid,
purpose: Option<String>,
},
VaultLock,
VaultEnrolmentMaterial {
respond: Option<Sender<Option<VaultReleased>>>,
},
RespondQuestion {
key: SessionSlot,
tool_id: String,
outcome: QuestionOutcome,
},
SetDictateOverride {
key: SessionSlot,
update: DictateOverrideUpdate,
},
ResetDictateOverrides {
key: SessionSlot,
},
DictateCatalogueCheck,
DictateInstall {
variant: String,
},
DictateActivate {
role: DictateRole,
file: String,
},
DictateDeactivate {
role: DictateRole,
},
DictateBench {
target: BenchTarget,
tier: Tier,
},
DictateBenchStop,
VoiceBenchStart,
VoiceBenchStop,
DictateReadAloudStart {
initiator: Option<u64>,
},
DictateReadAloudStop {
keep: bool,
initiator: Option<u64>,
},
DictateReadAloudDelete {
id: String,
},
DictateBenchDelete {
target: BenchTarget,
tier: Tier,
corpus: String,
},
DictateUninstall {
file: String,
},
PluginInstall {
plugin_id: String,
scope: String,
project: Option<String>,
},
PluginUpdate {
plugin_id: String,
scope: String,
},
PluginUpdateAll,
PluginCheckUpdates,
MarketplaceAdd {
source: String,
dispatch_id: Option<u64>,
},
MarketplaceRepair {
name: String,
},
SpawnProject {
project_name: String,
launch_settings: SessionLaunchSettings,
},
TaskVerdict {
project: String,
id: String,
approve: bool,
words: Option<String>,
},
TaskAnswer {
project: String,
id: String,
words: String,
},
TaskRank {
project: String,
id: String,
to: RankMove,
},
TaskAssign {
project: String,
id: String,
owner: Option<String>,
},
TaskCreate {
project: String,
subject: String,
parent: Option<String>,
},
TaskMove {
project: String,
id: String,
to: TaskStatus,
place: Option<RankMove>,
},
TaskReopen {
project: String,
id: String,
},
TaskReserve {
project: String,
id: String,
reserved: bool,
},
DeliverPeerPrompt {
caller: SessionSlot,
target_project: String,
wrapped: WrappedPrompt,
respond: Option<Sender<Result<(), String>>>,
},
SpawnWorker {
project_key: ProjectKey,
label: String,
charter: String,
spawned_by: SessionSlot,
resume_existing: Option<String>,
kick: Option<String>,
resume_kick: Option<String>,
interactive: bool,
mcp_families: Option<Vec<String>>,
cwd: Option<String>,
from_boot_respawn: bool,
return_to: Option<Sender<Result<WorkerSpawnReply, String>>>,
},
CloseWorker {
project_key: ProjectKey,
label: String,
},
DespawnWorker {
project_key: ProjectKey,
label: String,
force: bool,
respond: Option<Sender<DespawnResult>>,
},
DeliverWorkerPrompt {
caller: SessionSlot,
project_key: ProjectKey,
target_label: String,
wrapped: WrappedPrompt,
respond: Option<Sender<Result<(), String>>>,
},
DeliverWorkerPromptToLead {
caller: SessionSlot,
target_lead_key: SessionSlot,
wrapped: WrappedPrompt,
respond: Option<Sender<Result<(), String>>>,
},
DeliverGotifyMessage {
project: String,
team_role: Option<String>,
notification: GotifyNotification,
},
DictateStream {
key: SessionSlot,
options: DictateAxes,
surface: Option<String>,
initiator: Option<u64>,
},
DictateStop {
key: SessionSlot,
submit: bool,
initiator: Option<u64>,
},
SetReviewThreadStatus {
project: String,
branch: String,
thread_id: String,
status: ReviewStatus,
},
CloseSession {
session_key: SessionSlot,
},
UpsertReviewThread {
project: String,
branch: String,
thread: ReviewThread,
origin: Option<SessionSlot>,
sent_words: Option<String>,
respond: Option<Sender<bool>>,
},
DeleteReviewThread {
project: String,
branch: String,
thread_id: String,
respond: Option<Sender<bool>>,
},
SubmitReview {
project: String,
branch: String,
summary: Option<String>,
thread_ids: Vec<String>,
origin: SessionSlot,
respond: Option<Sender<Option<ReviewSet>>>,
},
VoiceMode {
key: SessionSlot,
on: bool,
explicit: bool,
initiator: Option<u64>,
},
VoicePreview {
key: SessionSlot,
voice: String,
},
}Expand description
The core’s write protocol, re-exported for the same reason the update is: a view acts by dispatching the core’s own command rather than a second vocabulary this crate would have to keep in step. Command envelope: a view -> forge-workspace.
Every variant carries a SessionSlot identifying the target
session task. Workspace::dispatch fans the variant into the
matching task’s command receiver.
A reply channel cannot cross a socket, so the fields carrying one are
Option and skipped on the wire: #[serde(skip)] reconstructs a field
on deserialize, which needs a Default, and a bare oneshot::Sender has
none while an Option does.
Variants§
Prompt
PromptUnder
Self::Prompt, under an id the caller already minted.
A view mints its own so it can draw the prompt’s row and key it to the
CLI’s command_lifecycle frames by id, without matching on order or
text - two sends with a cron fire between them cannot be told apart any
other way. Every other dispatcher uses Self::Prompt and lets the
core mint.
Fields
key: SessionSlotattachments: Vec<ImageAttachment>source: PromptSourceWho dispatched it, for the queued row’s label.
dispatch_id: Option<u64>The pressing view’s own token for this press, like
Self::MarketplaceAdd’s: a refusal of this prompt echoes it, so
a composer with sends out on two seats marks the one that failed
(#1583). None from a view that minted none.
Cancel
Fields
key: SessionSlotCancelQueuedPrompt
Drop one prompt still in the CLI’s queue, by the uuid it was sent under.
ReadCallOutput
A view opened the row of a finished call and asks for the command’s own output: the tail of the file the CLI streamed it to.
Answered by the transport from its held conversation, which carries
the frame that named the call’s output_file. The answer is
SessionUpdate::CallOutput - the tail, or a named reason there is
none. Asking again re-reads, which is the whole of what a running
tail would need.
SetMode
SetModel
NewSession
ResumeSession
Handoff
Hand this seat over to a new session that continues its work.
Two halves of one handoff. brief: None is the entry: the seat is
asked for the judgment half in the procedure turn. brief: Some(note)
is the exit: the turn’s note, accepted only while a handoff is
running. Either way the successor is started the way /new starts one.
RespondPermission
RespondSlackPost
Answer a held Slack draft. The blocked Slack handler is awaiting
this answer: approving sends it, declining sends nothing, and a
send-back carries the reader’s words to the agent instead.
App-level command (key() returns None): the registry is
workspace state, and key names the owner the answer is
checked against, not a SessionTask route.
RespondBrowserHandOff
Answer a parked browser hand-off. The blocked browser_hand_off
handler is awaiting this answer: what it means, the door in the client
that sent it, and - stamped by the server - the connection that carried
it. App-level like RespondSlackPost: the registry is workspace state,
and key names the owner the answer is checked against.
RespondTerminalHandOff
Answer a parked terminal hand-off. The blocked terminal__hand_off
handler is awaiting this answer: what it means, the door in the client
that sent it, and - stamped by the server - the connection that carried
it. App-level like RespondBrowserHandOff: the registry is workspace
state, and key names the owner the answer is checked against.
AnswerDocumentHandOff
Answer a parked document hand-off: NotNow declines it, Approve
and Feedback release it with the reader’s decision, note and the
review the finish filed. The blocked hand_off_document call is
awaiting this; key names the owner the answer is checked against.
RespondSettingsWrite
Answer a held configuration write. The blocked settings__set /
settings__unset handler is awaiting this decision; approved: false means nothing is written. App-level like RespondSlackPost:
the registry is workspace state, and key names the owner the
answer is checked against.
RespondVaultAsk
Answer a held vault call. The blocked MCP handler is awaiting this
answer; a decline runs nothing, a send-back carries the reader’s note
to the agent, and an approval runs the call after unlocking the shared
session when the card asked for the master password. App-level like
RespondSettingsWrite: the registry is workspace state, and key
names the owner the answer is checked against.
BiometricEnrol
A client enrolled one purpose’s wrapped secret under its device’s enrolment. The blob is opaque: the client wrapped it under the platform authenticator’s key, and the core stores the bytes without decoding them.
enrolment is the id the client minted for the device; an id the core
has not seen starts the enrolment, and a known one adds or replaces the
purpose’s blob - a rotation’s rewrite is the same command again.
App-level (key() returns None); the outcome rides
SessionUpdate::BiometricEnrolmentsChanged.
Fields
BiometricRewrite
A rotation’s rewrite of an existing enrolment: the same purpose and a fresh blob on an id the core already holds.
The person’s press is what creates a row; this may only update
one. A device the person revoked has no row, so its rewrite answers
false - the client then locks rather than re-registering itself.
Answers true when the blob was replaced, false when the id or the
purpose is gone, and a store failure is a dispatch refusal. App-level;
the outcome rides SessionUpdate::BiometricEnrolmentsChanged.
BiometricRelease
A client asks for the blob it enrolled for one purpose, so its gate can
unwrap it. Answers through reply_to with the blob, or null when that
purpose is not enrolled on this device - the state a client falls back
to the password on. A store failure is a dispatch refusal instead, so
the two cannot read alike.
BiometricRevoke
The reader dropped one purpose’s enrolment, or (purpose: None) the
device’s whole enrolment. App-level; the outcome rides
SessionUpdate::BiometricEnrolmentsChanged.
VaultLock
The reader locked the shared vault now, rather than waiting for the idle clock. App-level: the process holds one vault session, so the settings page’s vault card is where the press comes from and no seat has a better claim to it than another. Workspace state rather than agent traffic, and the parked cards are re-stamped so a dock that already drew one asks for the password again.
VaultEnrolmentMaterial
The material a client wraps to enrol this device: the shared session’s
current refresh token and the account’s user key, base64. Answers
through reply_to with forge_primitives::vault::VaultReleased,
and null while the session is locked - the state a device cannot
enrol from.
It is the vault’s material, not the biometric gate’s. The gate stores and releases whatever blob a consumer wraps; only the vault knows what its own material is, so the command lives on the vault’s surface.
Fields
respond: Option<Sender<Option<VaultReleased>>>RespondQuestion
SetDictateOverride
Set one /dictate overlay axis for this session, or clear
every axis at once. Workspace state on the DomainSession,
never routed to the agent; the echo lands as
SessionUpdate::DictateOverrides.
ResetDictateOverrides
Clear every /dictate override this session holds.
Fields
key: SessionSlotDictateCatalogueCheck
Check the model catalogue now. App-level command (key() returns
None); routed inline. Fire-and-forget: the outcome rides
SessionUpdate::DictateModelsChanged, so a client watches its
own subscription rather than a reply.
DictateInstall
Download a feed variant into the models directory. App-level
(key() returns None), and its outcome rides
SessionUpdate::DictateModelsChanged the way a check’s does.
The variant is the feed’s own verb for the model; its doc supplies the download link, and nothing here constructs one.
DictateActivate
Load one installed model and make it the role’s active model on the
running forge. App-level, and its outcome rides
SessionUpdate::DictateModelsChanged.
DictateDeactivate
Return one role to its [dictate] key or its compiled default.
App-level, same outcome channel as activation.
Fields
role: DictateRoleDictateBench
Run one model over one tier of this machine’s own material.
App-level, and its outcome rides
SessionUpdate::DictateModelsChanged like the others: ticks as
it runs, then the result or the reason.
DictateBenchStop
Stop the bench in flight. What ran so far is discarded: a partial corpus is not a result.
VoiceBenchStart
Score the speaking loop on the public corpus: synthesize each transcript, hear it back through the transcribing and cleanup pair, and report the round-trip words, the first-audio latency and the render’s pace. App-level, same outcome channel as the words bench.
VoiceBenchStop
Stop the speaking bench in flight: a partial corpus is not a result.
DictateReadAloudStart
Begin recording the read-aloud set: the connection that sent this feeds the audio as binary frames, like a take a client captures, and no session owns it. App-level; the recording’s own state rides the models read.
Fields
initiator: Option<u64>The connection that sent this, stamped by the transport that
received it, as Command::DictateStream’s is: only that
connection can feed or stop the recording.
DictateReadAloudStop
Stop the read-aloud recording. keep writes it into the set; a stop
that does not keeps nothing, which is the page’s cancel.
DictateReadAloudDelete
Drop one recording from the read-aloud set, by the id the page read.
DictateBenchDelete
Drop one saved bench result, named by its own key: the target, the tier, and the corpus it ran over.
DictateUninstall
Remove one downloaded model - the file and its record - which is what a sweep that scored a candidate it did not adopt leaves behind.
PluginInstall
Install one plugin at a scope. project names a declared project
for the project/local scopes and is ignored for user, which
runs in the home dir; it is a NAME rather than a path so the
working directory always comes from forge.toml.
PluginUpdate
Update one installed plugin in its own scope and project, which the registry lookup resolves - the caller states no cwd.
PluginUpdateAll
Update exactly the stale installed plugins, one CLI call per entry, continuing past failures. The set is computed from a fresh scan at dispatch, so it is what the marketplace reports NOW.
PluginCheckUpdates
Refresh the inventory through the CLI and report which installed plugins have a newer marketplace version, applying nothing.
MarketplaceAdd
Add a marketplace by owner/repo or URL, at user scope.
dispatch_id is the pressing view’s own token for this press - the
add is the one plugin action whose answer disposes a draft a page is
holding - and it rides back on the refusal of this dispatch and on
the outcome frames that answer it, so the press can attribute its own
answer to itself.
MarketplaceRepair
Repair a drifted marketplace with the CLI’s remove-and-re-add pair.
SpawnProject
User clicked an inactive project to wake it. No key - the
session doesn’t exist yet; workspace resolves the id it will run
under and emits SessionUpdate::Spawning then ::Connected on
it. This is an App-level Command, not per-session.
TaskVerdict
The user’s verdict on a row waiting on their look. App-level (no
session route): the board is the user’s, and the row names its
own project. approve completes it (past the verify gate - this
IS the verification); a send-back returns it to its owner with
words appended to the detail and one message into that session.
TaskAnswer
The user answers a row waiting on a question: the words go into the detail, the row resumes in progress, and its owner hears once.
TaskRank
The user moves a row in its queue.
TaskAssign
The user gives a row an owner (a label in the project) or takes it back.
TaskCreate
The user cuts a row from the board.
TaskMove
The user moves a row’s state directly - the drag across the board.
place carries where a drop landed, so the position the user chose
is the priority the row keeps; a keyboard lane step carries none.
TaskReopen
The user strikes a lead’s attestation: the look gate is re-minted
and the row parks on the user again. App-level like TaskVerdict.
TaskReserve
The user reserves a row’s pick for themselves (or releases it): the sweep leaves a reserved row alone rather than dispatching it.
DeliverPeerPrompt
Cross-project delivery (#114 v1). Dispatched by the
mcp__forge__agents__send_message tool impl via
WorkspaceFacade::deliver_peer_prompt. Routed to
spawn::handle_deliver_peer_prompt which: (a) resolves
target_project to a SessionSlot; (b) if target is running,
dispatches a plain Command::Prompt carrying the wrapper
prose; (c) if sleeping, parks wrapped for target’s owner and
dispatches Command::SpawnProject.
App-level command (key() returns None); workspace routes
to the App-level handler in spawn.rs. The caller field is
the source session’s key, carried so a parking that never lands
can route its delivery notice back.
Fields
caller: SessionSlotwrapped: WrappedPromptrespond: Option<Sender<Result<(), String>>>What happened to the prompt: Ok(()) once it was accepted -
handed to the target’s running session, or parked for a spawn
this handler kicked off - and Err(reason) when nothing could
take it. The sender’s ack is built from this answer alone, the
way the worker engine’s is (#2342).
SpawnWorker
Spawn a new worker session in project_key. Dispatched by
the agents__spawn MCP Tool impl after caller-tag validation,
or by the lead Connected hook when reviving
across-restart workers.
resume_existing: when Some(session_id), the handler resumes
the named session via SessionTarget::Session instead of
spawning fresh. The session_id MUST already carry the
forge:worker:<label> tag (the lead Connected hook verifies
this before dispatching). WorkerEntry::needs_tag is set false
on the resume path since the tag is already on disk. None
preserves the original fresh-spawn path used by agents__spawn.
return_to carries the spawn result back to the calling tool
invocation; Ok((session_id, tag)) on success, Err(message)
on failure (e.g. tag-write failed; see spawn handler). On the
resume path the lead Connected hook ignores the reply (the
worker is for the lead’s benefit, not in response to a tool
call).
Fields
project_key: ProjectKeyspawned_by: SessionSlotThe slot of the session issuing the spawn - normally the project’s lead.
kick: Option<String>First message delivered as the worker’s user turn on Connected,
via the rate-limited kick dispatcher. Either agents__spawn’s
kick, or - on a re-spawn - the row’s resume_kick or the
generic restart note, which is the only thing that wakes a
resuming worker. None -> no kick (the worker idles until
told).
resume_kick: Option<String>Re-orient message delivered instead of the generic restart
note when this worker is later resumed. None on a re-spawn
keeps whatever the row already holds.
interactive: boolWhether this worker keeps the built-in AskUserQuestion
tool. Read from the persisted row on a re-spawn, so it
survives a forge restart.
mcp_families: Option<Vec<String>>The MCP families this spawn selects, exactly as
agents__spawn validated them; None/empty means every
family. Written to the row on a first spawn and read back
from it on a re-spawn, so the selection survives restarts.
cwd: Option<String>The tree this spawn runs the worker in, already resolved to
its repo root by the facade: None means the project’s own
path. Written to the row, which is what every read-back
composes from - so a defaulted field reads exactly as a
spawn written before the key existed.
from_boot_respawn: boolTrue only for boot/reconnect re-spawns of persisted workers, which bypass the project’s worker cap: they restore state the user already had, and their reply is dropped, so a refusal there would strand rows with no caller to hear it.
return_to: Option<Sender<Result<WorkerSpawnReply, String>>>CloseWorker
Close (terminate agent + remove from live_workers) the
worker identified by label in project_key. Dispatched by
a view’s per-row close click. If duplicates exist, the latest-
spawned matching entry is removed.
DespawnWorker
Despawn the worker identified by label in project_key:
terminate its agent, drop it from live_workers, AND clean up
its git worktree. Dispatched by the
agents__despawn MCP tool (lead-only). Unlike CloseWorker
(a view’s X-button), this also removes the worker’s git worktree:
a clean worktree is removed; a dirty one (uncommitted/untracked
or unpushed commits) blocks the despawn unless force. The
outcome flows back via respond.
DeliverWorkerPrompt
Deliver a wrapped peer-style prompt to a worker. Same envelope
as DeliverPeerPrompt but addressed by worker label within
the caller’s project rather than by cross-project name.
respond carries what actually happened to the prompt: Ok(())
once it was accepted - handed to the target’s session queue, held
for its turn end, or parked for its connect - and Err(reason)
when nothing could take it. The sender’s ack is built from this
answer alone, so it can only claim what the delivery really did.
DeliverWorkerPromptToLead
Deliver a wrapped prompt from a worker back to its lead.
Dispatched by the agents__send_message Tool impl
when the caller addresses label="lead". The target
SessionSlot is resolved at Tool dispatch time from the
worker’s spawned_by_session_id so the handler can deliver
directly without re-doing the lookup against a possibly-mutated
live_workers map. Wire shape is identical to
DeliverWorkerPrompt (same PeerEnvelopeAppended echo + same
Command::Prompt dispatch into the target session), and its
respond carries the same acceptance answer.
DeliverGotifyMessage
Deliver a matched Gotify notification into project as a plain
user turn (spawning the project if asleep, exactly like a cron
prompt). team_role targets a durable team worker when Some;
None targets the project lead. Dispatched by the
GotifyHost::deliver port impl, one per matching subscription;
handled by spawn::deliver_gotify_message. notification carries
the resolved app name, title, message, and priority - its
to_prose() is the user-turn text, and the same struct drives the
chat-echo. App-level command (key() returns None).
DictateStream
Begin a take the CLIENT captures: the connection that sent this feeds the audio as binary frames, so no device is opened here. Registered synchronously by the dispatch that receives it, so the frame a client sends next on the same ordered socket finds it.
options are the axes that client’s panel was showing; they
normalize this take, where an in-process take reads the
session’s stored overrides at its stop.
Fields
key: SessionSlotoptions: DictateAxessurface: Option<String>The surface whose own capture began this take - composer,
review, files, doc - carried so the landed words reach the
surface that began them and no other. Absent from a client older
than the field, which is the one case every surface reads as “the
old rules decide”, as it did before.
Read as an opaque name, never validated. The vocabulary is the client’s own, and under forge’s trust model a client that misnames its take only mislabels its own words.
DictateStop
Submit (submit = true) or abandon the take started by key.
During recording this is release-to-submit vs discard; during a
transcription in flight it abandons the ticket.
Fields
key: SessionSlotinitiator: Option<u64>The connection whose take this stop addresses, stamped like
Command::DictateStream’s: only the connection a take
belongs to can stop it. None is this process’s own.
SetReviewThreadStatus
Set the status of one review thread by id, bumping its
updated_at. App-level command (key() returns None);
routed inline.
CloseSession
Release the session session_key (cascade-aware: a project
lead’s workers terminate first). Dispatched by a view’s
per-row close click; a view removes its own bucket around the
dispatch. App-level command (key() returns None); routed
inline.
Fields
session_key: SessionSlotUpsertReviewThread
Insert or replace one review thread by id in (project, branch).
respond carries whether the write was confirmed, so the
overlay’s at-risk durability flag stays honest (the same
value-returning shape as SpawnWorker.return_to). The handler
runs inline in dispatch, so the response is present the moment
dispatch returns. App-level command (key() returns None).
Fields
thread: ReviewThreadorigin: Option<SessionSlot>The seat whose words this write sends: a landed take’s words are
the seat’s until a write carries them, and this is what tells the
composer which take the comment spends (#2283). None from a
client older than the field, and from a write no seat made.
DeleteReviewThread
Delete one review thread from (project, branch) - the reviewer’s
own retraction, wherever its card is drawn. respond carries
whether the store confirmed; None when the write failed.
SubmitReview
Submit (seal) the listed threads as one review round.
respond carries the minted review, None when the store
write failed. App-level command (key() returns None).
Fields
origin: SessionSlotVoiceMode
A client turned voice on or off for the seat. The listener set is per connection, so the transport stamps which one.
Fields
key: SessionSlotVoicePreview
Play one voice on the seat’s own stream, so it can be heard before it is chosen. Refused when that seat’s speaker switch is off.
Implementations§
Source§impl Command
impl Command
Sourcepub fn key(&self) -> Option<&SessionSlot>
pub fn key(&self) -> Option<&SessionSlot>
The SessionSlot this command routes to, or None for
App-level commands (SpawnProject). Workspace::dispatch
routes None commands to its app-level handler (which resolves
the id the new session will run under and spawns the agent);
Some(key) commands route to the matching SessionTask.
Sourcepub fn dispatch_id(&self) -> Option<u64>
pub fn dispatch_id(&self) -> Option<u64>
The dispatch id the press that made this command minted, when it named one: what a refusal echoes and the outcome frames carry back.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Command, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Command, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Serialize for Command
impl Serialize for Command
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl !RefUnwindSafe for Command
impl !UnwindSafe for Command
impl Freeze for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnsafeUnpin for Command
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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