Skip to main content

NodeRequest

Enum NodeRequest 

Source
pub enum NodeRequest {
Show 64 variants Snapshot, Resync { after_sequence: u64, }, ArmHarnessMcpReservation { reservation_id: HarnessMcpReservationId, activation_digest: HarnessMcpActivationDigest, spawn_spec: SpawnSpec, launch: HarnessMcpLaunchV1, expires_at_unix_ms: u64, }, SpawnSpecWithHarnessMcp { reservation_id: HarnessMcpReservationId, activation_digest: HarnessMcpActivationDigest, spec: SpawnSpec, deadline_unix_ms: u64, }, ActivateHarnessMcpReservation { reservation_id: HarnessMcpReservationId, activation_digest: HarnessMcpActivationDigest, record_id: SessionRecordId, session: SessionAddress, }, AbortHarnessMcpReservation { reservation_id: HarnessMcpReservationId, activation_digest: HarnessMcpActivationDigest, }, PutHarnessMcpReplyChunk { reservation_id: HarnessMcpReservationId, activation_digest: HarnessMcpActivationDigest, record_id: SessionRecordId, session: SessionAddress, call_id: HarnessMcpCallId, offset: u32, final_chunk: bool, chunk_hex: HarnessMcpReplyChunkHexV1, }, RejectHarnessMcpCall { reservation_id: HarnessMcpReservationId, activation_digest: HarnessMcpActivationDigest, record_id: SessionRecordId, session: SessionAddress, call_id: HarnessMcpCallId, reason: HarnessMcpRejectReasonV1, }, BeginDeliveryStage { manifest: DeliveryBundleManifestV2, }, PutDeliveryBlobChunk { stage_id: DeliveryStageId, blob_digest: DeliveryBlobDigestV1, offset: u64, chunk_hex: DeliveryBlobChunkHexV1, }, CommitDeliveryStage { stage_id: DeliveryStageId, }, AbortDeliveryStage { stage_id: DeliveryStageId, }, BrowseHostDirectories { directory: Option<OpaqueHostPath>, after: Option<OpaqueHostPath>, }, InspectWorkspace { workspace_id: WorkspaceId, }, ReadWorkspaceFile { workspace_id: WorkspaceId, path: RepositoryPath, }, WriteWorkspaceFile { workspace_id: WorkspaceId, path: RepositoryPath, expected_revision: WorkspaceFileRevision, text: String, }, CreateWorkspaceFile { workspace_id: WorkspaceId, path: RepositoryPath, }, CreateWorkspaceDirectory { workspace_id: WorkspaceId, path: RepositoryPath, }, ReadGitHistory { workspace_id: WorkspaceId, path: Option<RepositoryPath>, before: Option<GitObjectId>, limit: u16, }, ReadGitDiff { workspace_id: WorkspaceId, request: GitDiffRequest, }, AcquireController { lease_ms: u64, }, ReleaseController, RegisterWorkspace { workspace_id: WorkspaceId, root: OpaqueHostPath, }, CreateStandaloneWorkspace { workspace_id: WorkspaceId, root: OpaqueHostPath, initial_branch: Option<String>, }, UnregisterWorkspace { workspace_id: WorkspaceId, }, CreateWorktree { source_workspace_id: WorkspaceId, workspace_id: WorkspaceId, target_root: OpaqueHostPath, branch: String, base: Option<String>, }, RemoveWorktree { source_workspace_id: WorkspaceId, target_root: OpaqueHostPath, }, Spawn { workspace_id: WorkspaceId, provider: AgentId, mode: SessionMode, terminal_size: TerminalSize, initial_prompt: Option<String>, }, SpawnSpec { spec: SpawnSpec, }, SpawnManagedWorktree { request: ManagedWorktreeSpawnRequest, }, SpawnManagedWorktreeV2 { request: ManagedWorktreeSpawnRequestV2, }, CleanupManagedWorktree { lease_id: ManagedWorktreeLeaseId, }, Resume { session: SessionAddress, terminal_size: TerminalSize, initial_prompt: Option<String>, }, RenameSessionRecord { record_id: SessionRecordId, display_name: String, }, SetSessionTask { record_id: SessionRecordId, expected_revision: u64, target: SessionTaskTargetV1, }, IndexProviderSession { workspace_id: WorkspaceId, provider: AgentId, identity: ProviderSessionIdentity, display_name: String, }, IndexNativeSession { selection: NativeSessionSelection, display_name: String, }, ResumeSessionRecord { record_id: SessionRecordId, terminal_size: TerminalSize, initial_prompt: Option<String>, }, ForgetSessionRecord { record_id: SessionRecordId, }, CatalogNativeSessions { route: NativeSessionCatalogRoute, limit: u16, }, PageNativeSessions { route: NativeSessionCatalogRoute, window: NativeSessionCatalogWindow, catalog_revision: u64, recent_cutoff_unix_ms: u64, after_selection_id: Option<String>, limit: u16, }, PreviewNativeSession { selection: NativeSessionSelection, message_limit: u16, }, PreviewSessionRecord { record_id: SessionRecordId, message_limit: u16, }, DiscoverHistory { session: SessionAddress, limit: u16, }, LoadHistory { session: SessionAddress, candidate_id: String, }, ExportContextPackForSessionRecord { record_id: SessionRecordId, session: SessionAddress, }, ExportContextPack { session: SessionAddress, }, ForgetContextPack { context_id: SpawnContextId, }, ResolveDurableContextPack { context_id: SpawnContextId, }, ReadContextPack { digest: SpawnContextDigest, }, Prompt { session: SessionAddress, text: String, }, Paste { session: SessionAddress, text: String, }, Input { session: SessionAddress, text: String, }, TerminalBytes { session: SessionAddress, bytes: Vec<u8>, }, TerminalControl { session: SessionAddress, control: TerminalControl, }, Resize { session: SessionAddress, size: TerminalSize, }, Interrupt { session: SessionAddress, }, Stop { session: SessionAddress, force: bool, }, Remove { session: SessionAddress, }, ResolveInteraction { session: SessionAddress, correlation_id: String, response: ProviderInteractionResponse, }, SetSessionMode { session: SessionAddress, mode_id: String, }, SetSessionConfigOption { session: SessionAddress, option_id: String, value_json: String, }, SetSessionModel { session: SessionAddress, model_id: String, }, Shutdown,
}

Variants§

§

Snapshot

§

Resync

Fields

§after_sequence: u64
§

ArmHarnessMcpReservation

Fields

§activation_digest: HarnessMcpActivationDigest
§spawn_spec: SpawnSpec
§expires_at_unix_ms: u64
§

SpawnSpecWithHarnessMcp

Fields

§activation_digest: HarnessMcpActivationDigest
§deadline_unix_ms: u64
§

ActivateHarnessMcpReservation

Fields

§activation_digest: HarnessMcpActivationDigest
§

AbortHarnessMcpReservation

Fields

§activation_digest: HarnessMcpActivationDigest
§

PutHarnessMcpReplyChunk

Fields

§activation_digest: HarnessMcpActivationDigest
§offset: u32
§final_chunk: bool
§

RejectHarnessMcpCall

§

BeginDeliveryStage

§

PutDeliveryBlobChunk

Fields

§offset: u64
§

CommitDeliveryStage

Fields

§

AbortDeliveryStage

Fields

§

BrowseHostDirectories

§

InspectWorkspace

Fields

§workspace_id: WorkspaceId
§

ReadWorkspaceFile

Fields

§workspace_id: WorkspaceId
§

WriteWorkspaceFile

Fields

§workspace_id: WorkspaceId
§expected_revision: WorkspaceFileRevision
§text: String
§

CreateWorkspaceFile

Fields

§workspace_id: WorkspaceId
§

CreateWorkspaceDirectory

Fields

§workspace_id: WorkspaceId
§

ReadGitHistory

Fields

§workspace_id: WorkspaceId
§limit: u16
§

ReadGitDiff

Fields

§workspace_id: WorkspaceId
§

AcquireController

Fields

§lease_ms: u64
§

ReleaseController

§

RegisterWorkspace

Fields

§workspace_id: WorkspaceId
§

CreateStandaloneWorkspace

Fields

§workspace_id: WorkspaceId
§initial_branch: Option<String>
§

UnregisterWorkspace

Fields

§workspace_id: WorkspaceId
§

CreateWorktree

Fields

§source_workspace_id: WorkspaceId
§workspace_id: WorkspaceId
§target_root: OpaqueHostPath
§branch: String
§

RemoveWorktree

Fields

§source_workspace_id: WorkspaceId
§target_root: OpaqueHostPath
§

Spawn

Fields

§workspace_id: WorkspaceId
§provider: AgentId
§terminal_size: TerminalSize
§initial_prompt: Option<String>
§

SpawnSpec

Fields

§

SpawnManagedWorktree

§

SpawnManagedWorktreeV2

§

CleanupManagedWorktree

Fields

§

Resume

Fields

§terminal_size: TerminalSize
§initial_prompt: Option<String>
§

RenameSessionRecord

Fields

§display_name: String
§

SetSessionTask

Fields

§expected_revision: u64
§

IndexProviderSession

Fields

§workspace_id: WorkspaceId
§provider: AgentId
§display_name: String
§

IndexNativeSession

Fields

§display_name: String
§

ResumeSessionRecord

Fields

§terminal_size: TerminalSize
§initial_prompt: Option<String>
§

ForgetSessionRecord

Fields

§

CatalogNativeSessions

§

PageNativeSessions

Fields

§catalog_revision: u64
§recent_cutoff_unix_ms: u64
§after_selection_id: Option<String>
§limit: u16
§

PreviewNativeSession

Fields

§message_limit: u16
§

PreviewSessionRecord

Fields

§message_limit: u16
§

DiscoverHistory

Fields

§limit: u16
§

LoadHistory

Fields

§candidate_id: String
§

ExportContextPackForSessionRecord

Fields

§

ExportContextPack

Fields

§

ForgetContextPack

Fields

§context_id: SpawnContextId
§

ResolveDurableContextPack

Fields

§context_id: SpawnContextId
§

ReadContextPack

Fields

§

Prompt

Fields

§text: String
§

Paste

Fields

§text: String
§

Input

Fields

§text: String
§

TerminalBytes

Fields

§bytes: Vec<u8>
§

TerminalControl

Fields

§

Resize

Fields

§

Interrupt

Fields

§

Stop

Fields

§force: bool
§

Remove

Fields

§

ResolveInteraction

Answers the correlation_id an AgentStreamChunkKindV1::InteractionPrompt carries (minted by correlation::interaction_correlation). response must additionally match the interaction’s own kind (ProviderInteractionResponse::validate_for); that check needs the live interaction and is the routing layer’s job, not this wire’s.

Fields

§correlation_id: String
§

SetSessionMode

Fields

§mode_id: String
§

SetSessionConfigOption

Fields

§option_id: String
§value_json: String
§

SetSessionModel

Fields

§model_id: String
§

Shutdown

Implementations§

Source§

impl NodeRequest

Source

pub fn harness_mcp_contract_is_valid_at(&self, now_unix_ms: u64) -> bool

Source

pub fn native_session_catalog_contract_is_valid(&self) -> bool

Source

pub fn native_session_preview_contract_is_valid(&self) -> bool

Source

pub fn history_context_pack_contract_is_valid(&self) -> bool

Source

pub fn required_capability(&self) -> Option<&'static str>

Source

pub fn requires_worktree_selection_capability(&self) -> bool

Source

pub fn requires_spawn_spec_defaults_overrides_capability(&self) -> bool

Source

pub fn requires_spawn_profile_revision_capability(&self) -> bool

Source

pub fn requires_child_environment_profile_capability(&self) -> bool

Source

pub fn requires_session_bundle_materialization_capability(&self) -> bool

Source

pub fn requires_history_context_pack_capability(&self) -> bool

Source

pub fn is_replay_safe(&self) -> bool

Whether a caller may resend this exact request after a physical C2 reconnect without risking a double application on the node – gate4agent_c2_client::reconnect::C2ReconnectingHandle::request_until is the only caller: it never retries a request this returns false for, at any budget, no matter how long the link is down.

Conservative by construction: true only for a request that is either a pure read (nothing on the node changes, however many times it is sent) or otherwise idempotent by design (the same bytes at the same identity always land the same way, and a duplicate lands on an already-settled node state as a clean no-op/mismatch rather than a second effect) – PutHarnessMcpReplyChunk/RejectHarnessMcpCall (the harness-MCP read-proxy call’s own terminal reply, keyed by (reservation_id, activation_digest, call_id, offset)) are the only non-read members of that second group. Every spawn, every reservation/worktree/workspace lifecycle transition, every session mutation, and every delivery-bundle stage transition returns false – including PutDeliveryBlobChunk, which looks offset-keyed like PutHarnessMcpReplyChunk but backs a bundle commit this method does not have a mandate to reclassify as retry-safe.

Deliberately exhaustive with no _ arm: a newly added NodeRequest variant fails to compile here until someone classifies it, rather than silently inheriting a default in either direction.

Trait Implementations§

Source§

impl Clone for NodeRequest

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 NodeRequest

Source§

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

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

impl<'de> Deserialize<'de> for NodeRequest

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 Eq for NodeRequest

Source§

impl PartialEq for NodeRequest

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 NodeRequest

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 NodeRequest

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.