- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::nsmcp::QuestionBackend
::nsmcp::QuestionBackendShared reporting rules for Codex and direct API backends.create ...
Defined in /usr/local/ns/tcl/nsmcp/question-backend.tcl
Class Relations
- class: ::nx::Class
- superclass: ::nsmcp::Object
- subclass: ::nsmcp::ChatCompletionsBackend
, ::nsmcp::CodexQuestionBackend
Methods (to be applied on the object)
reportingInstructions (scripted, public)
nsmcp::QuestionBackendreportingInstructions base
Append diagnostic evidence-reporting rules to backend instructions. Use server-owned policy text so tool results cannot redefine coverage, timing or provenance requirements.
- Parameters:
- base (required)
- Server-owned base instruction string.
- Returns:
- The augmented instruction string.
- Testcases:
- No testcase defined.
Methods (to be applied on instances)
canonicalResult (scripted, public)
<instance of nsmcp::QuestionBackend> canonicalResult json
Remove redundant textual copies of structured tool evidence. Retain typed structured content and unrelated content blocks; leave nonmatching input unchanged.
- Parameters:
- json (required)
- Serialized JSON supplied by the backend transport.
- Returns:
- The canonical JSON result string.
- Testcases:
- No testcase defined.
describe (scripted, public)
<instance of nsmcp::QuestionBackend> describe
Describe the abstract question backend. Expose a minimal provider identifier without contacting an external service.
- Returns:
- The backend metadata dictionary.
- Testcases:
- No testcase defined.
run (scripted, public)
<instance of nsmcp::QuestionBackend> run question state emit
Declare the abstract question execution contract. Concrete providers emit events through the callback and manage their own continuation state.
- Parameters:
- question (required)
- Question text supplied to the selected provider.
- state (required)
- Opaque retained provider continuation or scan state.
- emit (required)
- Event callback prefix; returning false requests cancellation.
- Returns:
- No normal result; raises the abstract-method error.
- Testcases:
- No testcase defined.
toolCallResult (scripted, public)
<instance of nsmcp::QuestionBackend> toolCallResult item
Extract and normalize a Codex tool-call result. Keep transport and permission errors distinct from successful results and canonicalize duplicated structured evidence.
- Parameters:
- item (required)
- Rooted typed JSON for a completed backend tool-call item.
- Returns:
- Serialized JSON for the normalized tool result, or JSON null when absent.
- Testcases:
- No testcase defined.
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
![[i]](/resources/acs-subsite/ZoomIn16.gif)