Class ::nsmcp::CodeUpstreamTool

::nsmcp::CodeUpstreamTool[i] create ... \
           [ -adminExample (default "") ] \
           [ -adminSummary (default "") ] \
           [ -description (default "Compare an installed Tcl/NX/XOTcl procedure or method with literal source declarations in administrator-mapped public GitHub repositories. Returns immutable commit/file links, body and argument comparisons, bounded source excerpts and recent file commits. Optional configured baseline distinguishes differences from a declared installation baseline; differences alone do not prove a bug or an upstream fix. Never evaluates remote code or sends local source to GitHub. Requires enableCodeTools and enableCodeUpstream. Unsupported/dynamic/ambiguous source is unavailable, never equal.") ] \
           [ -inputSchema (default "{"type":"object","properties":{"name":{"type":"string"},"ref":{"type":"string","description":"Optional branch, tag or commit within the configured repository; defaults to the mapping ref."}},"required":["name"],"additionalProperties":false}") ] \
           [ -name (default "code_upstream_compare") ] \
           [ -outputSchema (default "") ] \
           [ -permission (default "diagnostics.code.read") ]

Defined in /usr/local/ns/tcl/nsmcp/code-upstream.tcl

Class Relations

  • class: ::nx::Class[i]
  • superclass: ::nsmcp::Tool[i]

Methods (to be applied on instances)

  • describe (scripted, public)

     <instance of nsmcp::CodeUpstreamTool[i]> describe

    Describe the upstream comparison tool and its network annotation. Start with the base descriptor and mark the configured GitHub comparison as an open-world operation.

    Returns:
    The rooted JSON tool descriptor.

    Testcases:
    No testcase defined.
  • execute (scripted, public)

     <instance of nsmcp::CodeUpstreamTool[i]> execute context arguments

    Compare a loaded definition with its configured GitHub upstream. Use administrator-owned repository mappings and immutable revisions; return explicit unavailable reasons rather than claiming an unperformed comparison.

    Parameters:
    context (required)
    Authenticated request context carrying the principal, grants and selected server.
    arguments (required)
    Rooted ns_json typed triples for the tool's JSON argument object.
    Returns:
    A rooted JSON tool-result object, including availability or job metadata as appropriate.

    Testcases:
    No testcase defined.
  • validate (scripted, public)

     <instance of nsmcp::CodeUpstreamTool[i]> validate arguments

    Validate upstream-comparison options. Decode the rooted JSON argument object and enforce this tool's option, range and combination constraints.

    Parameters:
    arguments (required)
    Rooted ns_json typed triples for the tool's JSON argument object.
    Returns:
    An empty result on success; invalid input raises RPC error -32602.

    Testcases:
    No testcase defined.