README

totto2727/agent-sdk/cli does not have a README file

#
CliSession

pub(open) trait CliSession {
fn id(Self) -> String?
fn continuation(Self) -> Continuation?
async fn prompt(Self, Prompt) -> FinalResponse
}

A live provider CLI session.

Cancelling the task running prompt cancels the provider call and propagates the cancellation error after provider cleanup.

#
Cli

pub struct Cli {
// private fields
}

Provider-neutral entry point for starting or resuming CLI sessions.

#
Cli::Cli

fn Cli::Cli(start : () -> &CliSession) -> Cli

Creates a CLI adapter from provider-specific session factories.

#
Cli::continue_session

fn Cli::continue_session(_self : Cli, continuation : Continuation) -> &CliSession

Resumes the provider session represented by an opaque continuation.

#
Cli::start

fn Cli::start(self : Cli) -> &CliSession

Starts a new provider session.

#
Continuation

pub struct Continuation {
// private fields
}

Opaque provider continuation identifier.

#
Continuation::Continuation

fn Continuation::Continuation(resume_session : () -> &CliSession) -> Continuation

Creates an opaque continuation handle from provider-owned resume behavior.

#
FinalResponse

pub struct FinalResponse {
text : String
session_id : String?
changed_files : ReadOnlyArray[
Path
]
continuation : Continuation?
}

Final text and continuation returned by a completed prompt.

#
FinalResponse::FinalResponse

fn FinalResponse::FinalResponse(text : String, session_id? : String, changed_files? : ReadOnlyArray[
Path
], continuation? : Continuation) -> FinalResponse

Creates a final response.

#
Prompt

pub struct Prompt {
text : String
context_files : ReadOnlyArray[
Path
]
} derive(Eq,
Debug
)

Text sent to a provider CLI session.

#
Prompt::Prompt

fn Prompt::Prompt(text : String, context_files? : ReadOnlyArray[
Path
]) -> Prompt

Creates a provider-neutral prompt.

Source Files

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io