Documentation
¶
Index ¶
- func Conflict(detail string) *mcplib.CallToolResult
- func InternalError(detail string) *mcplib.CallToolResult
- func NotFound(detail string) *mcplib.CallToolResult
- func ParseSectionsParam(args map[string]any) (map[string]string, error)
- func RegisterSectionAwareTools(s *Server, templateSvc *templates.Service)
- func RunStdio(s *Server) error
- func ValidationFailed(detail string) *mcplib.CallToolResult
- func WorkspaceNotInitialized() *mcplib.CallToolResult
- type AckHookEventsRequest
- type AckHookEventsResponse
- type PollHookEventsRequest
- type PollHookEventsResponse
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Conflict ¶
func Conflict(detail string) *mcplib.CallToolResult
Conflict returns an MCP error for state conflicts.
func InternalError ¶
func InternalError(detail string) *mcplib.CallToolResult
InternalError returns an MCP error for internal failures.
func NotFound ¶
func NotFound(detail string) *mcplib.CallToolResult
NotFound returns an MCP error for missing resources.
func ParseSectionsParam ¶
ParseSectionsParam extracts and validates the sections parameter from an MCP request. Exported for test access. Internal handlers call this directly.
func RegisterSectionAwareTools ¶
RegisterSectionAwareTools registers the fixed MCP tools that support section-aware operations and template discovery. All tools are registered unconditionally regardless of workspace state, satisfying the constitutional mandate. If called more than once, subsequent calls only update the template service reference without re-registering tools to avoid duplicates.
func ValidationFailed ¶
func ValidationFailed(detail string) *mcplib.CallToolResult
ValidationFailed returns an MCP error for parameter validation failures.
func WorkspaceNotInitialized ¶
func WorkspaceNotInitialized() *mcplib.CallToolResult
WorkspaceNotInitialized returns an MCP error for missing workspace.
Types ¶
type AckHookEventsRequest ¶
type AckHookEventsRequest struct {
ConsumerID string `json:"consumer_id" validate:"required"`
Seq int64 `json:"seq" validate:"required,gte=1"`
}
AckHookEventsRequest contains validated parameters for backlogit_ack_hook_events.
type AckHookEventsResponse ¶
type AckHookEventsResponse struct {
AckedSeq int64 `json:"acked_seq"`
}
AckHookEventsResponse is the JSON response for backlogit_ack_hook_events.
type PollHookEventsRequest ¶
type PollHookEventsRequest struct {
ConsumerID string `json:"consumer_id" validate:"required"`
}
PollHookEventsRequest contains validated parameters for backlogit_poll_hook_events.
type PollHookEventsResponse ¶
type PollHookEventsResponse struct {
Events []events.HookEvent `json:"events"`
DerivedSignals []events.HookEvent `json:"derived_signals"`
}
PollHookEventsResponse is the JSON response for backlogit_poll_hook_events.
type Server ¶
type Server struct {
RootPath string
Workspace *core.Workspace
Events *events.EventWriter
Telemetry *events.TelemetryWriter
HookEvents *events.HookEventWriter
// contains filtered or unexported fields
}
Server holds dependencies for MCP tool handlers.
func NewServerForRoot ¶
NewServerForRoot creates an MCP server bound to a repository root even when the workspace has not been initialized yet.
func (*Server) DescribeTools ¶
DescribeTools returns the registered MCP tools with their descriptions.
func (*Server) ListTools ¶
ListTools returns the names of all registered MCP tools. Used by contract tests to verify the fixed tool surface.
func (*Server) MCPServer ¶
MCPServer returns the underlying mcp-go server instance. Intended for use by test helpers that need direct MCP client access.
func (*Server) RegisterResources ¶
func (s *Server) RegisterResources()
RegisterResources adds workspace metadata resources to the MCP server.
func (*Server) RegisterTools ¶
func (s *Server) RegisterTools()
RegisterTools adds all backlogit tools to the MCP server.