Class ::nsmcp::CodexQuestionBackend (public)
::nx::Class ::nsmcp::CodexQuestionBackend
Defined in /usr/local/ns/tcl/nsmcp/question-backend.tcl
- Testcases:
- No testcase defined.
Source code: :property {authenticator ::nsmcp::auth} :property {registry ::nsmcp::tools} :property {authorizer ::nsmcp::authorization} :property command:required :property launcher:required :property tokenFile:required :property url:required :property {host {}} :property directory:required :property {model {}} :property {timeout 180} :property {initializeTimeout 30} :property {toolOutputTokens:integer 65536} :property {maxResultBytes 131072} :property {bridgeHost {}} :property {bridgePort:integer 8766} :property {bridgeSecretFile {}} :property {bridgeDirectory /work} :public method outputTokenLimit {} { # Retained backend instances may predate the property after Tcl reload. set value [expr {[info exists :toolOutputTokens] ? ${:toolOutputTokens} : [ns_config -int ns/server/[ns_info server]/module/nsmcp questionCodexToolOutputTokens 65536]}] if {$value<1024 || $value>262144} { error "questionCodexToolOutputTokens must be between 1024 and 262144" } return $value } :public method describe {} { # # Describe configured Codex question execution. # # Report model, timeout and local or bridge transport without starting a # provider process. # # @return The backend metadata dictionary. # return [dict create backend codex model ${:model} timeout ${:timeout} initializeTimeout ${:initializeTimeout} toolOutputTokens [:outputTokenLimit] transport [expr {${:bridgeHost} eq "" ? "local-stdio" : "bridge-stdio"}]] } :public method run {question state emit} { # # Execute a question through a temporary Codex runner. # # Forward continuation state and events, destroying the runner on both # success and failure. # # @param question Question text supplied to the selected provider. # @param state Opaque retained provider continuation or scan state. # @param emit Event callback prefix; returning false requests cancellation. # # @return The runner's completion or continuation result. # set runner [::nsmcp::CodexQuestionRun new -backend [self] -emit $emit] try { return [$runner run $question $state] } finally { $runner destroy } }XQL Not present: Generic, PostgreSQL, Oracle
![[i]](/resources/acs-subsite/ZoomIn16.gif)