Sign in

    colmugx/mcp/runtime does not have a README file

    RequestCancelled

    pub(all) suberror RequestCancelled {
    RequestCancelled
    } derive(
    Debug
    )

    CancellationRegistration

    pub struct CancellationRegistration {
    token : CancellationToken
    id : Int
    }

    Dispose registrations when their request/task completes to avoid retaining finished work.

    CancellationRegistration::dispose

    CancellationToken

    pub struct CancellationToken {
    cancelled : Bool
    callbacks : Map[Int, () -> Unit]
    next_callback_id : Int
    }

    Request-local cooperative cancellation, shared with its transport and task owner.

    CancellationToken::cancel

    fn CancellationToken::cancel(self : CancellationToken) -> Unit

    CancellationToken::is_cancelled

    fn CancellationToken::is_cancelled(self : CancellationToken) -> Bool

    CancellationToken::new

    CancellationToken::on_cancel

    fn CancellationToken::on_cancel(self : CancellationToken, callback : () -> Unit) -> CancellationRegistration

    Register runtime cleanup. Late registrations run immediately after cancellation.

    CancellationToken::throw_if_cancelled

    fn CancellationToken::throw_if_cancelled(self : CancellationToken) -> Unit raise RequestCancelled

    Principal

    pub(all) struct Principal {
    id : String
    scopes : Array[String]
    attributes : Map[String, Json]
    } derive(Eq,
    Debug
    )

    Identity established by a trusted server-side authenticator, never by request metadata.

    Principal::equal

    fn Principal::equal(Principal, Principal) -> Bool

    Principal::new

    fn Principal::new(id : String, scopes? : Array[String], attributes? : Map[String, Json]) -> Principal

    Principal::not_equal

    fn Principal::not_equal(x : Principal, y : Principal) -> Bool

    ProgressReporter

    pub struct ProgressReporter {
    send : async (Double, Double?, String?) -> Unit
    cancellation_token : CancellationToken
    }

    Reports progress through the current request's transport; direct dispatch defaults to a no-op.

    ProgressReporter::new

    fn ProgressReporter::new(send : async (Double, Double?, String?) -> Unit, cancellation_token? : CancellationToken) -> ProgressReporter

    ProgressReporter::report

    async fn ProgressReporter::report(self : ProgressReporter, progress : Double, total? : Double, message? : String) -> Unit

    RequestContext

    pub(all) struct RequestContext {
    request_id :
    RequestId

    meta : Map[String, Json]
    principal : Principal?
    input_responses : Map[String, Json]
    continuation_state : Json?
    cancellation_token : CancellationToken
    progress_reporter : ProgressReporter
    }

    Runtime data stays separate from tool/prompt business arguments, including on MRTR retry.

    RequestContext::new

    fn RequestContext::new(request_id :
    RequestId
    , meta? : Map[String, Json], principal? : Principal, input_responses? : Map[String, Json], continuation_state? : Json, cancellation_token? : CancellationToken, progress_reporter? : ProgressReporter) -> RequestContext

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io