nsmcp::CodexQuestionRun method rpc (protected)

 <instance of nsmcp::CodexQuestionRun[i]> rpc method params

Defined in /usr/local/ns/tcl/nsmcp/question-backend.tcl

Parameters:
method (required)
params (required)

Testcases:
No testcase defined.
Source code:
set :stage $method
set :rpcMethod $method
set began [clock milliseconds]
set :rpcDeadline [expr {min(${:deadline},$began+10000)}]
# Discovery and thread setup can start the MCP transport. They share
# the startup budget rather than each receiving another 30 seconds.
if {${:startupDeadline}>0 && $method in {mcpServerStatus/list thread/start thread/resume}} {
    set :rpcDeadline [expr {min(${:deadline},${:startupDeadline})}]
}
try {
    :checkDeadline
    if {$method eq "turn/start"} {
        set :turnSubmitted true
    }
    set id [:send $method $params]
    while {![dict exists ${:replies} $id]} {
        :receive
    }
    set reply [dict get ${:replies} $id]
    dict unset :replies $id
    if {[dict exists $reply error]} {
        error "Codex App Server rejected $method (code [dict get $reply error code]): [string range [dict get $reply error message] 0 2047]"
    }
    return [dict get $reply result]
} finally {
    dict incr :rpcMilliseconds $method [expr {max(0,[clock milliseconds]-$began)}]
    catch {
        :emit [dict create type backendDiagnostic diagnostic [:diagnostic]]
    }
    set :rpcDeadline 0
    set :rpcMethod {}
}
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: