sdkruntime

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package sdkruntime 提供 Pinax MCP 的官方 Go SDK candidate 运行时。

设计(pinax-mcp-official-sdk-v1):本包不携带业务逻辑。工具、资源、 schema 校验、错误与脱敏语义全部委托 internal/mcpserver.Server.Handle 单点 dispatch,两个 runtime(legacy 手写 stdio 与本包)对同一注册目录 投影,保证行为同源。4.2 真实客户端验收(2026-09-11)完成后,本包为 默认 runtime(pinax-mcp-official-sdk-v1 §4.4);legacy 手写实现保留为 兼容窗口内的回退路径,经 PINAX_MCP_RUNTIME=legacy 显式启用。

Index

Constants

View Source
const RuntimeName = "official-sdk"

RuntimeName 是启用本运行时的 PINAX_MCP_RUNTIME 取值。

Variables

This section is empty.

Functions

func New

func New(service *app.Service, vault string, options mcpserver.ServerOptions) *mcp.Server

New 基于统一注册目录构造官方 SDK server。所有 handler 委托 mcpserver.Server.Handle,schema 校验与错误码与 legacy runtime 同源。

func Serve

func Serve(ctx context.Context, service *app.Service, vault string, in io.Reader, out io.Writer, options mcpserver.ServerOptions) error

Serve 以官方 Go SDK stdio 运行时服务一次 MCP 会话。签名与 mcpserver.ServeWithOptions 对齐,便于 CLI 层在同一装配线下切换。

func String

func String() string

String 返回运行时名,供诊断输出。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL