Native MoonBit SDK for starting and managing an OpenCode server
Dependencies
@async.with_task_group() group => {
let server = @opencode.create_opencode_server(group)
println(server.url())
server.close()
}pub(all) suberror ServerError {
StartFailed(String)
StartTimeout(timeout_ms~ : Int, output~ : String)
MalformedOutput(line~ : String)
ServerExited(code~ : Int, output~ : String)
CleanupFailed(String)
} derive(Debug)fn ServerOptions::ServerOptions(hostname? : String, port? : Int, timeout_ms? : Int, config? : Json) -> ServerOptionsasync fn[X] create_opencode_server(group : TaskGroup[X], options? : ServerOptions, command? : String, extra_env? : Map[String, String]) -> Server raise ServerErrorNative MoonBit SDK for starting and managing an OpenCode server
Dependencies