Documentation
¶
Overview ¶
@index Shared MCP runtime assembly for stdio and HTTP server entry points.
Index ¶
- func FlushQueryCache(cache *mcp.Cache)
- func RunStdio(rt *core.Runtime, opts Options) error
- type Instance
- type MCPPostprocessPolicy
- func (p *MCPPostprocessPolicy) RecordRun(ctx context.Context, record postprocesspolicy.RunRecord) error
- func (p *MCPPostprocessPolicy) Reset(ctx context.Context, tool string) error
- func (p *MCPPostprocessPolicy) Resolve(ctx context.Context, input postprocesspolicy.DecisionInput) (string, string, error)
- func (p *MCPPostprocessPolicy) Status(ctx context.Context, opts postprocesspolicy.StatusOptions) (*postprocesspolicy.StatusSummary, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FlushQueryCache ¶
FlushQueryCache clears the MCP query cache if it exists. @intent let graph updates invalidate shared MCP cache without coupling to transport packages. @sideEffect cache가 있으면 저장된 질의 결과를 비운다.
Types ¶
type Instance ¶
type Instance struct {
Server *mcpgo.MCPServer
Cache *mcp.Cache
Deps *mcp.Deps
PostprocessSummary func(context.Context) (*postprocesspolicy.StatusSummary, error)
// contains filtered or unexported fields
}
Instance is a fully assembled MCP server plus runtime resources. @intent share MCP server construction while keeping stdio and HTTP transports in separate packages.
type MCPPostprocessPolicy ¶
type MCPPostprocessPolicy struct {
// contains filtered or unexported fields
}
MCPPostprocessPolicy manages post-processing policies for the MCP runtime. @intent MCP 실행 경로가 후처리 정책 결정을 공통 래퍼로 호출하게 한다.
func NewPostprocessPolicy ¶
func NewPostprocessPolicy(db *gorm.DB) *MCPPostprocessPolicy
NewPostprocessPolicy creates a new MCP post-processing policy wrapper. @intent MCP 실행 경로에서 후처리 정책 엔진과 저장소를 함께 묶어 제공한다.
func (*MCPPostprocessPolicy) RecordRun ¶
func (p *MCPPostprocessPolicy) RecordRun(ctx context.Context, record postprocesspolicy.RunRecord) error
RecordRun logs the results of a post-processing run. @intent 후처리 실행 결과를 정책 저장소에 기록해 후속 판단에 반영한다. @sideEffect ccg_postprocess_run_logs 상태를 갱신한다.
func (*MCPPostprocessPolicy) Reset ¶
func (p *MCPPostprocessPolicy) Reset(ctx context.Context, tool string) error
Reset clears the state of a specific post-processing tool. @intent 실패 누적 상태를 초기화해 특정 후처리 도구를 다시 정상 정책으로 돌린다. @sideEffect 해당 도구의 정책 상태를 재설정한다.
func (*MCPPostprocessPolicy) Resolve ¶
func (p *MCPPostprocessPolicy) Resolve(ctx context.Context, input postprocesspolicy.DecisionInput) (string, string, error)
Resolve decides the policy for a given tool and input. @intent 요청된 후처리 도구에 적용할 정책과 출처를 계산한다.
func (*MCPPostprocessPolicy) Status ¶
func (p *MCPPostprocessPolicy) Status(ctx context.Context, opts postprocesspolicy.StatusOptions) (*postprocesspolicy.StatusSummary, error)
Status returns the current status summary of post-processing. @intent 운영 상태 엔드포인트가 후처리 건강 상태를 요약해서 볼 수 있게 한다.
type Options ¶
type Options struct {
CacheTTL time.Duration
NoCache bool
OTELEndpoint string
NamespaceRoot string
WorkspaceRoot string
RepoRoot string
MaxFileBytes int64
MaxTotalParsedBytes int64
ServiceVersion string
RagIndexDir string
RagProjectDesc string
}
Options controls shared MCP runtime setup independent of transport. @intent pass cache, telemetry, namespace, RAG, and parse-limit settings without importing HTTP server code.