pub struct SessionRpc<'a> { /* private fields */ }Expand description
Typed view over a Session’s RPC namespace.
Implementations§
Source§impl<'a> SessionRpc<'a>
impl<'a> SessionRpc<'a>
Sourcepub fn agent(&self) -> SessionRpcAgent<'a>
pub fn agent(&self) -> SessionRpcAgent<'a>
session.agent.* sub-namespace.
Sourcepub fn auth(&self) -> SessionRpcAuth<'a>
pub fn auth(&self) -> SessionRpcAuth<'a>
session.auth.* sub-namespace.
Sourcepub fn commands(&self) -> SessionRpcCommands<'a>
pub fn commands(&self) -> SessionRpcCommands<'a>
session.commands.* sub-namespace.
Sourcepub fn event_log(&self) -> SessionRpcEventLog<'a>
pub fn event_log(&self) -> SessionRpcEventLog<'a>
session.eventLog.* sub-namespace.
Sourcepub fn extensions(&self) -> SessionRpcExtensions<'a>
pub fn extensions(&self) -> SessionRpcExtensions<'a>
session.extensions.* sub-namespace.
Sourcepub fn fleet(&self) -> SessionRpcFleet<'a>
pub fn fleet(&self) -> SessionRpcFleet<'a>
session.fleet.* sub-namespace.
Sourcepub fn history(&self) -> SessionRpcHistory<'a>
pub fn history(&self) -> SessionRpcHistory<'a>
session.history.* sub-namespace.
Sourcepub fn instructions(&self) -> SessionRpcInstructions<'a>
pub fn instructions(&self) -> SessionRpcInstructions<'a>
session.instructions.* sub-namespace.
Sourcepub fn lsp(&self) -> SessionRpcLsp<'a>
pub fn lsp(&self) -> SessionRpcLsp<'a>
session.lsp.* sub-namespace.
Sourcepub fn mcp(&self) -> SessionRpcMcp<'a>
pub fn mcp(&self) -> SessionRpcMcp<'a>
session.mcp.* sub-namespace.
Sourcepub fn metadata(&self) -> SessionRpcMetadata<'a>
pub fn metadata(&self) -> SessionRpcMetadata<'a>
session.metadata.* sub-namespace.
Sourcepub fn mode(&self) -> SessionRpcMode<'a>
pub fn mode(&self) -> SessionRpcMode<'a>
session.mode.* sub-namespace.
Sourcepub fn model(&self) -> SessionRpcModel<'a>
pub fn model(&self) -> SessionRpcModel<'a>
session.model.* sub-namespace.
Sourcepub fn name(&self) -> SessionRpcName<'a>
pub fn name(&self) -> SessionRpcName<'a>
session.name.* sub-namespace.
Sourcepub fn options(&self) -> SessionRpcOptions<'a>
pub fn options(&self) -> SessionRpcOptions<'a>
session.options.* sub-namespace.
Sourcepub fn permissions(&self) -> SessionRpcPermissions<'a>
pub fn permissions(&self) -> SessionRpcPermissions<'a>
session.permissions.* sub-namespace.
Sourcepub fn plan(&self) -> SessionRpcPlan<'a>
pub fn plan(&self) -> SessionRpcPlan<'a>
session.plan.* sub-namespace.
Sourcepub fn plugins(&self) -> SessionRpcPlugins<'a>
pub fn plugins(&self) -> SessionRpcPlugins<'a>
session.plugins.* sub-namespace.
Sourcepub fn queue(&self) -> SessionRpcQueue<'a>
pub fn queue(&self) -> SessionRpcQueue<'a>
session.queue.* sub-namespace.
Sourcepub fn remote(&self) -> SessionRpcRemote<'a>
pub fn remote(&self) -> SessionRpcRemote<'a>
session.remote.* sub-namespace.
Sourcepub fn schedule(&self) -> SessionRpcSchedule<'a>
pub fn schedule(&self) -> SessionRpcSchedule<'a>
session.schedule.* sub-namespace.
Sourcepub fn shell(&self) -> SessionRpcShell<'a>
pub fn shell(&self) -> SessionRpcShell<'a>
session.shell.* sub-namespace.
Sourcepub fn skills(&self) -> SessionRpcSkills<'a>
pub fn skills(&self) -> SessionRpcSkills<'a>
session.skills.* sub-namespace.
Sourcepub fn tasks(&self) -> SessionRpcTasks<'a>
pub fn tasks(&self) -> SessionRpcTasks<'a>
session.tasks.* sub-namespace.
Sourcepub fn telemetry(&self) -> SessionRpcTelemetry<'a>
pub fn telemetry(&self) -> SessionRpcTelemetry<'a>
session.telemetry.* sub-namespace.
Sourcepub fn tools(&self) -> SessionRpcTools<'a>
pub fn tools(&self) -> SessionRpcTools<'a>
session.tools.* sub-namespace.
Sourcepub fn ui(&self) -> SessionRpcUi<'a>
pub fn ui(&self) -> SessionRpcUi<'a>
session.ui.* sub-namespace.
Sourcepub fn usage(&self) -> SessionRpcUsage<'a>
pub fn usage(&self) -> SessionRpcUsage<'a>
session.usage.* sub-namespace.
Sourcepub fn workspaces(&self) -> SessionRpcWorkspaces<'a>
pub fn workspaces(&self) -> SessionRpcWorkspaces<'a>
session.workspaces.* sub-namespace.
Sourcepub async fn suspend(&self) -> Result<(), Error>
pub async fn suspend(&self) -> Result<(), Error>
Suspends the session while preserving persisted state for later resume.
Wire method: session.suspend.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn send(&self, params: SendRequest) -> Result<SendResult, Error>
pub async fn send(&self, params: SendRequest) -> Result<SendResult, Error>
Sends a user message to the session and returns its message ID.
Wire method: session.send.
§Parameters
params- Parameters for sending a user message to the session
§Returns
Result of sending a user message
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn abort(&self, params: AbortRequest) -> Result<AbortResult, Error>
pub async fn abort(&self, params: AbortRequest) -> Result<AbortResult, Error>
Aborts the current agent turn.
Wire method: session.abort.
§Parameters
params- Parameters for aborting the current turn
§Returns
Result of aborting the current turn
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn shutdown(&self, params: ShutdownRequest) -> Result<(), Error>
pub async fn shutdown(&self, params: ShutdownRequest) -> Result<(), Error>
Shuts down the session and persists its final state. Awaits any deferred sessionEnd hooks before resolving so user-supplied hook scripts complete before the runtime tears down.
Wire method: session.shutdown.
§Parameters
params- Parameters for shutting down the session
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Sourcepub async fn log(&self, params: LogRequest) -> Result<LogResult, Error>
pub async fn log(&self, params: LogRequest) -> Result<LogResult, Error>
Emits a user-visible session log event.
Wire method: session.log.
§Parameters
params- Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip.
§Returns
Identifier of the session event that was emitted for the log message.
Experimental. This API is part of an experimental wire-protocol surface and may change or be removed in future SDK or CLI releases. Pin both the SDK and CLI versions if your code depends on it.
Trait Implementations§
Source§impl<'a> Clone for SessionRpc<'a>
impl<'a> Clone for SessionRpc<'a>
Source§fn clone(&self) -> SessionRpc<'a>
fn clone(&self) -> SessionRpc<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more