v0

package
v0.1.158 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Toolbox_Identity_FullMethodName          = "/codefly.services.toolbox.v0.Toolbox/Identity"
	Toolbox_ListTools_FullMethodName         = "/codefly.services.toolbox.v0.Toolbox/ListTools"
	Toolbox_ListToolSummaries_FullMethodName = "/codefly.services.toolbox.v0.Toolbox/ListToolSummaries"
	Toolbox_DescribeTool_FullMethodName      = "/codefly.services.toolbox.v0.Toolbox/DescribeTool"
	Toolbox_CallTool_FullMethodName          = "/codefly.services.toolbox.v0.Toolbox/CallTool"
	Toolbox_ListResources_FullMethodName     = "/codefly.services.toolbox.v0.Toolbox/ListResources"
	Toolbox_ReadResource_FullMethodName      = "/codefly.services.toolbox.v0.Toolbox/ReadResource"
	Toolbox_ListPrompts_FullMethodName       = "/codefly.services.toolbox.v0.Toolbox/ListPrompts"
	Toolbox_GetPrompt_FullMethodName         = "/codefly.services.toolbox.v0.Toolbox/GetPrompt"
)

Variables

View Source
var File_codefly_services_toolbox_v0_toolbox_proto protoreflect.FileDescriptor
View Source
var Toolbox_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "codefly.services.toolbox.v0.Toolbox",
	HandlerType: (*ToolboxServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Identity",
			Handler:    _Toolbox_Identity_Handler,
		},
		{
			MethodName: "ListTools",
			Handler:    _Toolbox_ListTools_Handler,
		},
		{
			MethodName: "ListToolSummaries",
			Handler:    _Toolbox_ListToolSummaries_Handler,
		},
		{
			MethodName: "DescribeTool",
			Handler:    _Toolbox_DescribeTool_Handler,
		},
		{
			MethodName: "CallTool",
			Handler:    _Toolbox_CallTool_Handler,
		},
		{
			MethodName: "ListResources",
			Handler:    _Toolbox_ListResources_Handler,
		},
		{
			MethodName: "ReadResource",
			Handler:    _Toolbox_ReadResource_Handler,
		},
		{
			MethodName: "ListPrompts",
			Handler:    _Toolbox_ListPrompts_Handler,
		},
		{
			MethodName: "GetPrompt",
			Handler:    _Toolbox_GetPrompt_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "codefly/services/toolbox/v0/toolbox.proto",
}

Toolbox_ServiceDesc is the grpc.ServiceDesc for Toolbox service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterToolboxServer

func RegisterToolboxServer(s grpc.ServiceRegistrar, srv ToolboxServer)

Types

type Blob

type Blob struct {

	// MediaType identifies the bytes, e.g. "image/png" or
	// "application/octet-stream".
	MediaType string `protobuf:"bytes,1,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"`
	// Data is the raw binary payload.
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Blob carries binary content with media metadata for display or persistence by the host.

func (*Blob) Descriptor deprecated

func (*Blob) Descriptor() ([]byte, []int)

Deprecated: Use Blob.ProtoReflect.Descriptor instead.

func (*Blob) GetData

func (x *Blob) GetData() []byte

func (*Blob) GetMediaType

func (x *Blob) GetMediaType() string

func (*Blob) ProtoMessage

func (*Blob) ProtoMessage()

func (*Blob) ProtoReflect

func (x *Blob) ProtoReflect() protoreflect.Message

func (*Blob) Reset

func (x *Blob) Reset()

func (*Blob) String

func (x *Blob) String() string

type CallToolRequest

type CallToolRequest struct {

	// Name is the exact tool name from ListToolsResponse.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Arguments are validated by the tool's input_schema before execution.
	Arguments *structpb.Struct `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"`
	// Roots constrain the operation's scope. The toolbox MUST refuse
	// operations that touch URIs outside these roots. Empty roots means
	// "use the toolbox's default scope from its manifest."
	Roots []string `protobuf:"bytes,3,rep,name=roots,proto3" json:"roots,omitempty"`
	// contains filtered or unexported fields
}

CallToolRequest invokes one named tool with JSON-shaped arguments.

func (*CallToolRequest) Descriptor deprecated

func (*CallToolRequest) Descriptor() ([]byte, []int)

Deprecated: Use CallToolRequest.ProtoReflect.Descriptor instead.

func (*CallToolRequest) GetArguments

func (x *CallToolRequest) GetArguments() *structpb.Struct

func (*CallToolRequest) GetName

func (x *CallToolRequest) GetName() string

func (*CallToolRequest) GetRoots

func (x *CallToolRequest) GetRoots() []string

func (*CallToolRequest) ProtoMessage

func (*CallToolRequest) ProtoMessage()

func (*CallToolRequest) ProtoReflect

func (x *CallToolRequest) ProtoReflect() protoreflect.Message

func (*CallToolRequest) Reset

func (x *CallToolRequest) Reset()

func (*CallToolRequest) String

func (x *CallToolRequest) String() string

type CallToolResponse

type CallToolResponse struct {

	// Content blocks returned by the tool. Empty when the tool
	// surfaced only an error.
	Content []*Content `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
	// Error is non-empty when the tool refused or failed. Distinct from
	// a transport-level error; this is the tool saying "I tried, here's
	// why it didn't work."
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// CanonicalRouted is true when the toolbox refused because the
	// request targeted a binary/operation it doesn't own — set the
	// suggested toolbox in error and let the agent reroute.
	CanonicalRouted bool `protobuf:"varint,3,opt,name=canonical_routed,json=canonicalRouted,proto3" json:"canonical_routed,omitempty"`
	// RoutedTo is the toolbox the agent should call instead, when
	// CanonicalRouted is true. Empty when the binary has no claimed
	// owner (use the built-in fallback's hint in error).
	RoutedTo string `protobuf:"bytes,4,opt,name=routed_to,json=routedTo,proto3" json:"routed_to,omitempty"`
	// contains filtered or unexported fields
}

CallToolResponse is the tool-level result. Tool errors are represented here instead of as transport errors so partial results can still flow.

func (*CallToolResponse) Descriptor deprecated

func (*CallToolResponse) Descriptor() ([]byte, []int)

Deprecated: Use CallToolResponse.ProtoReflect.Descriptor instead.

func (*CallToolResponse) GetCanonicalRouted

func (x *CallToolResponse) GetCanonicalRouted() bool

func (*CallToolResponse) GetContent

func (x *CallToolResponse) GetContent() []*Content

func (*CallToolResponse) GetError

func (x *CallToolResponse) GetError() string

func (*CallToolResponse) GetRoutedTo

func (x *CallToolResponse) GetRoutedTo() string

func (*CallToolResponse) ProtoMessage

func (*CallToolResponse) ProtoMessage()

func (*CallToolResponse) ProtoReflect

func (x *CallToolResponse) ProtoReflect() protoreflect.Message

func (*CallToolResponse) Reset

func (x *CallToolResponse) Reset()

func (*CallToolResponse) String

func (x *CallToolResponse) String() string

type Content

type Content struct {

	// Body is the typed payload carried by this content block.
	//
	// Types that are valid to be assigned to Body:
	//
	//	*Content_Text
	//	*Content_Structured
	//	*Content_Blob
	Body isContent_Body `protobuf_oneof:"body"`
	// contains filtered or unexported fields
}

Content is the result of a tool call. Mirrors MCP's content model: a list of typed parts so a tool can return text + a structured payload + diagnostics in one envelope.

func (*Content) Descriptor deprecated

func (*Content) Descriptor() ([]byte, []int)

Deprecated: Use Content.ProtoReflect.Descriptor instead.

func (*Content) GetBlob

func (x *Content) GetBlob() *Blob

func (*Content) GetBody

func (x *Content) GetBody() isContent_Body

func (*Content) GetStructured

func (x *Content) GetStructured() *structpb.Struct

func (*Content) GetText

func (x *Content) GetText() string

func (*Content) ProtoMessage

func (*Content) ProtoMessage()

func (*Content) ProtoReflect

func (x *Content) ProtoReflect() protoreflect.Message

func (*Content) Reset

func (x *Content) Reset()

func (*Content) String

func (x *Content) String() string

type Content_Blob

type Content_Blob struct {
	// Binary blob with a media type. For images, archives, etc.
	Blob *Blob `protobuf:"bytes,3,opt,name=blob,proto3,oneof"`
}

type Content_Structured

type Content_Structured struct {
	// Structured payload (JSON-shaped). Use when the agent should
	// reason about typed fields.
	Structured *structpb.Struct `protobuf:"bytes,2,opt,name=structured,proto3,oneof"`
}

type Content_Text

type Content_Text struct {
	// Plain text — the most common path.
	Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}

type DescribeToolRequest

type DescribeToolRequest struct {

	// Dotted tool name as returned in ToolSummary.name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

DescribeToolRequest asks for the full spec of ONE tool by name.

func (*DescribeToolRequest) Descriptor deprecated

func (*DescribeToolRequest) Descriptor() ([]byte, []int)

Deprecated: Use DescribeToolRequest.ProtoReflect.Descriptor instead.

func (*DescribeToolRequest) GetName

func (x *DescribeToolRequest) GetName() string

func (*DescribeToolRequest) ProtoMessage

func (*DescribeToolRequest) ProtoMessage()

func (*DescribeToolRequest) ProtoReflect

func (x *DescribeToolRequest) ProtoReflect() protoreflect.Message

func (*DescribeToolRequest) Reset

func (x *DescribeToolRequest) Reset()

func (*DescribeToolRequest) String

func (x *DescribeToolRequest) String() string

type DescribeToolResponse

type DescribeToolResponse struct {

	// Full spec when the named tool exists. Unset when error is set.
	Tool *ToolSpec `protobuf:"bytes,1,opt,name=tool,proto3" json:"tool,omitempty"`
	// Set when the requested tool name doesn't exist. Empty on success.
	Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

DescribeToolResponse carries the spec OR an error. Error is set when name doesn't match any tool; tool is unset in that case.

func (*DescribeToolResponse) Descriptor deprecated

func (*DescribeToolResponse) Descriptor() ([]byte, []int)

Deprecated: Use DescribeToolResponse.ProtoReflect.Descriptor instead.

func (*DescribeToolResponse) GetError

func (x *DescribeToolResponse) GetError() string

func (*DescribeToolResponse) GetTool

func (x *DescribeToolResponse) GetTool() *ToolSpec

func (*DescribeToolResponse) ProtoMessage

func (*DescribeToolResponse) ProtoMessage()

func (*DescribeToolResponse) ProtoReflect

func (x *DescribeToolResponse) ProtoReflect() protoreflect.Message

func (*DescribeToolResponse) Reset

func (x *DescribeToolResponse) Reset()

func (*DescribeToolResponse) String

func (x *DescribeToolResponse) String() string

type GetPromptRequest

type GetPromptRequest struct {

	// Name is the prompt identifier from ListPromptsResponse.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Arguments supplies values for the prompt's declared parameters.
	Arguments *structpb.Struct `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"`
	// contains filtered or unexported fields
}

GetPromptRequest renders one prompt using JSON-shaped arguments.

func (*GetPromptRequest) Descriptor deprecated

func (*GetPromptRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPromptRequest.ProtoReflect.Descriptor instead.

func (*GetPromptRequest) GetArguments

func (x *GetPromptRequest) GetArguments() *structpb.Struct

func (*GetPromptRequest) GetName

func (x *GetPromptRequest) GetName() string

func (*GetPromptRequest) ProtoMessage

func (*GetPromptRequest) ProtoMessage()

func (*GetPromptRequest) ProtoReflect

func (x *GetPromptRequest) ProtoReflect() protoreflect.Message

func (*GetPromptRequest) Reset

func (x *GetPromptRequest) Reset()

func (*GetPromptRequest) String

func (x *GetPromptRequest) String() string

type GetPromptResponse

type GetPromptResponse struct {

	// Description of the rendered prompt for catalog UIs.
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// Messages making up the rendered prompt.
	Messages []*PromptMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

GetPromptResponse is the rendered prompt conversation.

func (*GetPromptResponse) Descriptor deprecated

func (*GetPromptResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetPromptResponse.ProtoReflect.Descriptor instead.

func (*GetPromptResponse) GetDescription

func (x *GetPromptResponse) GetDescription() string

func (*GetPromptResponse) GetMessages

func (x *GetPromptResponse) GetMessages() []*PromptMessage

func (*GetPromptResponse) ProtoMessage

func (*GetPromptResponse) ProtoMessage()

func (*GetPromptResponse) ProtoReflect

func (x *GetPromptResponse) ProtoReflect() protoreflect.Message

func (*GetPromptResponse) Reset

func (x *GetPromptResponse) Reset()

func (*GetPromptResponse) String

func (x *GetPromptResponse) String() string

type IdentityRequest

type IdentityRequest struct {
	// contains filtered or unexported fields
}

IdentityRequest asks a toolbox to describe itself.

func (*IdentityRequest) Descriptor deprecated

func (*IdentityRequest) Descriptor() ([]byte, []int)

Deprecated: Use IdentityRequest.ProtoReflect.Descriptor instead.

func (*IdentityRequest) ProtoMessage

func (*IdentityRequest) ProtoMessage()

func (*IdentityRequest) ProtoReflect

func (x *IdentityRequest) ProtoReflect() protoreflect.Message

func (*IdentityRequest) Reset

func (x *IdentityRequest) Reset()

func (*IdentityRequest) String

func (x *IdentityRequest) String() string

type IdentityResponse

type IdentityResponse struct {

	// Name from the toolbox manifest (e.g. "git", "docker", "bash").
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Version from the manifest (semver).
	Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// Description from the manifest, surface in catalog UIs.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// CanonicalFor lists the binaries this toolbox claims as canonical
	// owner. Mirrors the manifest field; useful for cross-toolbox
	// diagnostics ("who owns kubectl?").
	CanonicalFor []string `protobuf:"bytes,4,rep,name=canonical_for,json=canonicalFor,proto3" json:"canonical_for,omitempty"`
	// SandboxSummary is a string describing the sandbox the toolbox
	// operates under. Not the policy itself (that's host-side); just a
	// human-readable summary for "show me what this toolbox can do."
	SandboxSummary string `protobuf:"bytes,5,opt,name=sandbox_summary,json=sandboxSummary,proto3" json:"sandbox_summary,omitempty"`
	// contains filtered or unexported fields
}

IdentityResponse is the manifest-derived metadata the host uses for catalog display, diagnostics, and policy decisions.

func (*IdentityResponse) Descriptor deprecated

func (*IdentityResponse) Descriptor() ([]byte, []int)

Deprecated: Use IdentityResponse.ProtoReflect.Descriptor instead.

func (*IdentityResponse) GetCanonicalFor

func (x *IdentityResponse) GetCanonicalFor() []string

func (*IdentityResponse) GetDescription

func (x *IdentityResponse) GetDescription() string

func (*IdentityResponse) GetName

func (x *IdentityResponse) GetName() string

func (*IdentityResponse) GetSandboxSummary

func (x *IdentityResponse) GetSandboxSummary() string

func (*IdentityResponse) GetVersion

func (x *IdentityResponse) GetVersion() string

func (*IdentityResponse) ProtoMessage

func (*IdentityResponse) ProtoMessage()

func (*IdentityResponse) ProtoReflect

func (x *IdentityResponse) ProtoReflect() protoreflect.Message

func (*IdentityResponse) Reset

func (x *IdentityResponse) Reset()

func (*IdentityResponse) String

func (x *IdentityResponse) String() string

type ListPromptsRequest

type ListPromptsRequest struct {
	// contains filtered or unexported fields
}

ListPromptsRequest asks for the toolbox's prompt catalog.

func (*ListPromptsRequest) Descriptor deprecated

func (*ListPromptsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListPromptsRequest.ProtoReflect.Descriptor instead.

func (*ListPromptsRequest) ProtoMessage

func (*ListPromptsRequest) ProtoMessage()

func (*ListPromptsRequest) ProtoReflect

func (x *ListPromptsRequest) ProtoReflect() protoreflect.Message

func (*ListPromptsRequest) Reset

func (x *ListPromptsRequest) Reset()

func (*ListPromptsRequest) String

func (x *ListPromptsRequest) String() string

type ListPromptsResponse

type ListPromptsResponse struct {

	// Prompts is the complete prompt catalog for this toolbox.
	Prompts []*Prompt `protobuf:"bytes,1,rep,name=prompts,proto3" json:"prompts,omitempty"`
	// contains filtered or unexported fields
}

ListPromptsResponse contains every prompt template the toolbox exposes.

func (*ListPromptsResponse) Descriptor deprecated

func (*ListPromptsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListPromptsResponse.ProtoReflect.Descriptor instead.

func (*ListPromptsResponse) GetPrompts

func (x *ListPromptsResponse) GetPrompts() []*Prompt

func (*ListPromptsResponse) ProtoMessage

func (*ListPromptsResponse) ProtoMessage()

func (*ListPromptsResponse) ProtoReflect

func (x *ListPromptsResponse) ProtoReflect() protoreflect.Message

func (*ListPromptsResponse) Reset

func (x *ListPromptsResponse) Reset()

func (*ListPromptsResponse) String

func (x *ListPromptsResponse) String() string

type ListResourcesRequest

type ListResourcesRequest struct {
	// contains filtered or unexported fields
}

ListResourcesRequest asks for the toolbox's readable resource catalog.

func (*ListResourcesRequest) Descriptor deprecated

func (*ListResourcesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListResourcesRequest.ProtoReflect.Descriptor instead.

func (*ListResourcesRequest) ProtoMessage

func (*ListResourcesRequest) ProtoMessage()

func (*ListResourcesRequest) ProtoReflect

func (x *ListResourcesRequest) ProtoReflect() protoreflect.Message

func (*ListResourcesRequest) Reset

func (x *ListResourcesRequest) Reset()

func (*ListResourcesRequest) String

func (x *ListResourcesRequest) String() string

type ListResourcesResponse

type ListResourcesResponse struct {

	// Resources is the complete readable catalog for this toolbox.
	Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
	// contains filtered or unexported fields
}

ListResourcesResponse contains every readable resource the toolbox exposes.

func (*ListResourcesResponse) Descriptor deprecated

func (*ListResourcesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResourcesResponse.ProtoReflect.Descriptor instead.

func (*ListResourcesResponse) GetResources

func (x *ListResourcesResponse) GetResources() []*Resource

func (*ListResourcesResponse) ProtoMessage

func (*ListResourcesResponse) ProtoMessage()

func (*ListResourcesResponse) ProtoReflect

func (x *ListResourcesResponse) ProtoReflect() protoreflect.Message

func (*ListResourcesResponse) Reset

func (x *ListResourcesResponse) Reset()

func (*ListResourcesResponse) String

func (x *ListResourcesResponse) String() string

type ListToolSummariesRequest

type ListToolSummariesRequest struct {

	// Pre-filter: only return tools whose tags include every entry
	// here (conjunctive AND). Empty = no filter. Useful for
	// "read-only" pre-selection.
	TagsFilter []string `protobuf:"bytes,1,rep,name=tags_filter,json=tagsFilter,proto3" json:"tags_filter,omitempty"`
	// contains filtered or unexported fields
}

ListToolSummariesRequest can pre-filter by tags. Empty filter returns every tool the toolbox exposes. With filter, only tools whose tags include EVERY entry in tags_filter are returned (AND semantics — a "read-only AND fast" filter is conjunctive).

func (*ListToolSummariesRequest) Descriptor deprecated

func (*ListToolSummariesRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListToolSummariesRequest.ProtoReflect.Descriptor instead.

func (*ListToolSummariesRequest) GetTagsFilter

func (x *ListToolSummariesRequest) GetTagsFilter() []string

func (*ListToolSummariesRequest) ProtoMessage

func (*ListToolSummariesRequest) ProtoMessage()

func (*ListToolSummariesRequest) ProtoReflect

func (x *ListToolSummariesRequest) ProtoReflect() protoreflect.Message

func (*ListToolSummariesRequest) Reset

func (x *ListToolSummariesRequest) Reset()

func (*ListToolSummariesRequest) String

func (x *ListToolSummariesRequest) String() string

type ListToolSummariesResponse

type ListToolSummariesResponse struct {

	// Catalog entries — one per tool exposed by this toolbox after
	// tags_filter is applied.
	Tools []*ToolSummary `protobuf:"bytes,1,rep,name=tools,proto3" json:"tools,omitempty"`
	// contains filtered or unexported fields
}

ListToolSummariesResponse is the lightweight catalog.

func (*ListToolSummariesResponse) Descriptor deprecated

func (*ListToolSummariesResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListToolSummariesResponse.ProtoReflect.Descriptor instead.

func (*ListToolSummariesResponse) GetTools

func (x *ListToolSummariesResponse) GetTools() []*ToolSummary

func (*ListToolSummariesResponse) ProtoMessage

func (*ListToolSummariesResponse) ProtoMessage()

func (*ListToolSummariesResponse) ProtoReflect

func (*ListToolSummariesResponse) Reset

func (x *ListToolSummariesResponse) Reset()

func (*ListToolSummariesResponse) String

func (x *ListToolSummariesResponse) String() string

type ListToolsRequest

type ListToolsRequest struct {
	// contains filtered or unexported fields
}

ListToolsRequest asks for the toolbox's callable tool catalog.

func (*ListToolsRequest) Descriptor deprecated

func (*ListToolsRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListToolsRequest.ProtoReflect.Descriptor instead.

func (*ListToolsRequest) ProtoMessage

func (*ListToolsRequest) ProtoMessage()

func (*ListToolsRequest) ProtoReflect

func (x *ListToolsRequest) ProtoReflect() protoreflect.Message

func (*ListToolsRequest) Reset

func (x *ListToolsRequest) Reset()

func (*ListToolsRequest) String

func (x *ListToolsRequest) String() string

type ListToolsResponse

type ListToolsResponse struct {

	// Tools is the complete callable catalog for this toolbox.
	Tools []*Tool `protobuf:"bytes,1,rep,name=tools,proto3" json:"tools,omitempty"`
	// contains filtered or unexported fields
}

ListToolsResponse contains the callable tools exposed by the toolbox.

func (*ListToolsResponse) Descriptor deprecated

func (*ListToolsResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListToolsResponse.ProtoReflect.Descriptor instead.

func (*ListToolsResponse) GetTools

func (x *ListToolsResponse) GetTools() []*Tool

func (*ListToolsResponse) ProtoMessage

func (*ListToolsResponse) ProtoMessage()

func (*ListToolsResponse) ProtoReflect

func (x *ListToolsResponse) ProtoReflect() protoreflect.Message

func (*ListToolsResponse) Reset

func (x *ListToolsResponse) Reset()

func (*ListToolsResponse) String

func (x *ListToolsResponse) String() string

type Prompt

type Prompt struct {

	// Name is the stable prompt identifier.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Description tells the agent when this prompt is useful.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Arguments defines the accepted template parameters.
	Arguments []*PromptArgument `protobuf:"bytes,3,rep,name=arguments,proto3" json:"arguments,omitempty"`
	// contains filtered or unexported fields
}

Prompt describes a reusable prompt template exposed by the toolbox.

func (*Prompt) Descriptor deprecated

func (*Prompt) Descriptor() ([]byte, []int)

Deprecated: Use Prompt.ProtoReflect.Descriptor instead.

func (*Prompt) GetArguments

func (x *Prompt) GetArguments() []*PromptArgument

func (*Prompt) GetDescription

func (x *Prompt) GetDescription() string

func (*Prompt) GetName

func (x *Prompt) GetName() string

func (*Prompt) ProtoMessage

func (*Prompt) ProtoMessage()

func (*Prompt) ProtoReflect

func (x *Prompt) ProtoReflect() protoreflect.Message

func (*Prompt) Reset

func (x *Prompt) Reset()

func (*Prompt) String

func (x *Prompt) String() string

type PromptArgument

type PromptArgument struct {

	// Name is the parameter key expected by GetPromptRequest.arguments.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Description tells the agent what value to provide.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Required marks parameters that must be present for rendering.
	Required bool `protobuf:"varint,3,opt,name=required,proto3" json:"required,omitempty"`
	// contains filtered or unexported fields
}

PromptArgument describes one named parameter accepted by a prompt.

func (*PromptArgument) Descriptor deprecated

func (*PromptArgument) Descriptor() ([]byte, []int)

Deprecated: Use PromptArgument.ProtoReflect.Descriptor instead.

func (*PromptArgument) GetDescription

func (x *PromptArgument) GetDescription() string

func (*PromptArgument) GetName

func (x *PromptArgument) GetName() string

func (*PromptArgument) GetRequired

func (x *PromptArgument) GetRequired() bool

func (*PromptArgument) ProtoMessage

func (*PromptArgument) ProtoMessage()

func (*PromptArgument) ProtoReflect

func (x *PromptArgument) ProtoReflect() protoreflect.Message

func (*PromptArgument) Reset

func (x *PromptArgument) Reset()

func (*PromptArgument) String

func (x *PromptArgument) String() string

type PromptMessage

type PromptMessage struct {

	// Role: "user", "assistant", "system".
	Role string `protobuf:"bytes,1,opt,name=role,proto3" json:"role,omitempty"`
	// Content envelope, same shape as tool/resource content.
	Content []*Content `protobuf:"bytes,2,rep,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

PromptMessage is one rendered turn of the prompt's conversation.

func (*PromptMessage) Descriptor deprecated

func (*PromptMessage) Descriptor() ([]byte, []int)

Deprecated: Use PromptMessage.ProtoReflect.Descriptor instead.

func (*PromptMessage) GetContent

func (x *PromptMessage) GetContent() []*Content

func (*PromptMessage) GetRole

func (x *PromptMessage) GetRole() string

func (*PromptMessage) ProtoMessage

func (*PromptMessage) ProtoMessage()

func (*PromptMessage) ProtoReflect

func (x *PromptMessage) ProtoReflect() protoreflect.Message

func (*PromptMessage) Reset

func (x *PromptMessage) Reset()

func (*PromptMessage) String

func (x *PromptMessage) String() string

type ReadResourceRequest

type ReadResourceRequest struct {

	// URI is the resource identifier returned by ListResourcesResponse.
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// contains filtered or unexported fields
}

ReadResourceRequest fetches one resource by URI.

func (*ReadResourceRequest) Descriptor deprecated

func (*ReadResourceRequest) Descriptor() ([]byte, []int)

Deprecated: Use ReadResourceRequest.ProtoReflect.Descriptor instead.

func (*ReadResourceRequest) GetUri

func (x *ReadResourceRequest) GetUri() string

func (*ReadResourceRequest) ProtoMessage

func (*ReadResourceRequest) ProtoMessage()

func (*ReadResourceRequest) ProtoReflect

func (x *ReadResourceRequest) ProtoReflect() protoreflect.Message

func (*ReadResourceRequest) Reset

func (x *ReadResourceRequest) Reset()

func (*ReadResourceRequest) String

func (x *ReadResourceRequest) String() string

type ReadResourceResponse

type ReadResourceResponse struct {

	// Content of the resource. Same envelope as CallToolResponse so
	// resources can return text, structured data, or binary blobs.
	Content []*Content `protobuf:"bytes,1,rep,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

ReadResourceResponse returns the resource content using the same content envelope as tool calls.

func (*ReadResourceResponse) Descriptor deprecated

func (*ReadResourceResponse) Descriptor() ([]byte, []int)

Deprecated: Use ReadResourceResponse.ProtoReflect.Descriptor instead.

func (*ReadResourceResponse) GetContent

func (x *ReadResourceResponse) GetContent() []*Content

func (*ReadResourceResponse) ProtoMessage

func (*ReadResourceResponse) ProtoMessage()

func (*ReadResourceResponse) ProtoReflect

func (x *ReadResourceResponse) ProtoReflect() protoreflect.Message

func (*ReadResourceResponse) Reset

func (x *ReadResourceResponse) Reset()

func (*ReadResourceResponse) String

func (x *ReadResourceResponse) String() string

type Resource

type Resource struct {

	// URI uniquely identifying the resource. Convention:
	// "<scheme>://<path>", e.g. "git://HEAD", "file:///etc/host".
	Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
	// Human-readable name.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Description for the agent.
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	// MIME type of the resource's content.
	MimeType string `protobuf:"bytes,4,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
	// contains filtered or unexported fields
}

Resource describes read-only context the toolbox can expose to agents.

func (*Resource) Descriptor deprecated

func (*Resource) Descriptor() ([]byte, []int)

Deprecated: Use Resource.ProtoReflect.Descriptor instead.

func (*Resource) GetDescription

func (x *Resource) GetDescription() string

func (*Resource) GetMimeType

func (x *Resource) GetMimeType() string

func (*Resource) GetName

func (x *Resource) GetName() string

func (*Resource) GetUri

func (x *Resource) GetUri() string

func (*Resource) ProtoMessage

func (*Resource) ProtoMessage()

func (*Resource) ProtoReflect

func (x *Resource) ProtoReflect() protoreflect.Message

func (*Resource) Reset

func (x *Resource) Reset()

func (*Resource) String

func (x *Resource) String() string

type Tool

type Tool struct {

	// Dotted name. Convention: <toolbox>.<verb>, e.g. "git.commit",
	// "docker.run", "bash.exec".
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// One-line description for the agent to decide whether to call it.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// JSON Schema describing valid arguments. Encoded as a Struct so
	// protobuf doesn't force us to mirror JSON Schema's open recursion
	// in proto.
	InputSchema *structpb.Struct `protobuf:"bytes,3,opt,name=input_schema,json=inputSchema,proto3" json:"input_schema,omitempty"`
	// JSON Schema describing the result Content envelope. Optional;
	// missing means "free-form text + structured side-channel."
	OutputSchema *structpb.Struct `protobuf:"bytes,4,opt,name=output_schema,json=outputSchema,proto3" json:"output_schema,omitempty"`
	// Destructive marks the tool as state-mutating (writes, kills,
	// pushes). The host shows extra confirmation UI for these.
	Destructive bool `protobuf:"varint,5,opt,name=destructive,proto3" json:"destructive,omitempty"`
	// contains filtered or unexported fields
}

Tool is the heavy "everything in one envelope" callable surface. Returned by the legacy ListTools. New code prefers ToolSummary + ToolSpec (two-phase) below.

func (*Tool) Descriptor deprecated

func (*Tool) Descriptor() ([]byte, []int)

Deprecated: Use Tool.ProtoReflect.Descriptor instead.

func (*Tool) GetDescription

func (x *Tool) GetDescription() string

func (*Tool) GetDestructive

func (x *Tool) GetDestructive() bool

func (*Tool) GetInputSchema

func (x *Tool) GetInputSchema() *structpb.Struct

func (*Tool) GetName

func (x *Tool) GetName() string

func (*Tool) GetOutputSchema

func (x *Tool) GetOutputSchema() *structpb.Struct

func (*Tool) ProtoMessage

func (*Tool) ProtoMessage()

func (*Tool) ProtoReflect

func (x *Tool) ProtoReflect() protoreflect.Message

func (*Tool) Reset

func (x *Tool) Reset()

func (*Tool) String

func (x *Tool) String() string

type ToolExample

type ToolExample struct {

	// Human-readable summary of what this example demonstrates.
	// E.g. "List the last 5 commits on the default branch".
	Description string `protobuf:"bytes,1,opt,name=description,proto3" json:"description,omitempty"`
	// Sample arguments matching input_schema.
	Arguments *structpb.Struct `protobuf:"bytes,2,opt,name=arguments,proto3" json:"arguments,omitempty"`
	// Expected outcome — short prose, not strict assertion.
	// E.g. "returns 5 commit objects with hash, author, message".
	ExpectedOutcome string `protobuf:"bytes,3,opt,name=expected_outcome,json=expectedOutcome,proto3" json:"expected_outcome,omitempty"`
	// contains filtered or unexported fields
}

ToolExample is a worked invocation: arguments + outcome. The LLM uses these to pattern-match its own call. Authors should pick examples that span the parameter space (e.g. with vs without optional flags) rather than just one happy path.

func (*ToolExample) Descriptor deprecated

func (*ToolExample) Descriptor() ([]byte, []int)

Deprecated: Use ToolExample.ProtoReflect.Descriptor instead.

func (*ToolExample) GetArguments

func (x *ToolExample) GetArguments() *structpb.Struct

func (*ToolExample) GetDescription

func (x *ToolExample) GetDescription() string

func (*ToolExample) GetExpectedOutcome

func (x *ToolExample) GetExpectedOutcome() string

func (*ToolExample) ProtoMessage

func (*ToolExample) ProtoMessage()

func (*ToolExample) ProtoReflect

func (x *ToolExample) ProtoReflect() protoreflect.Message

func (*ToolExample) Reset

func (x *ToolExample) Reset()

func (*ToolExample) String

func (x *ToolExample) String() string

type ToolSpec

type ToolSpec struct {

	// Dotted name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Multi-paragraph description allowed. Spell out the contract,
	// edge cases, when to use vs. not use.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// JSON Schema for the input. Same shape as Tool.input_schema.
	InputSchema *structpb.Struct `protobuf:"bytes,3,opt,name=input_schema,json=inputSchema,proto3" json:"input_schema,omitempty"`
	// JSON Schema for the result Content envelope. Optional.
	OutputSchema *structpb.Struct `protobuf:"bytes,4,opt,name=output_schema,json=outputSchema,proto3" json:"output_schema,omitempty"`
	// Destructive marker; same semantics as Tool.destructive.
	Destructive bool `protobuf:"varint,5,opt,name=destructive,proto3" json:"destructive,omitempty"`
	// Same tag set as ToolSummary.tags (kept here for self-containment
	// — DescribeTool's response shouldn't require pairing with a
	// separate summary fetch).
	Tags []string `protobuf:"bytes,6,rep,name=tags,proto3" json:"tags,omitempty"`
	// Worked examples. The single biggest win of the two-phase design:
	// LLMs structure arguments dramatically better with 1-2 examples
	// than with a JSON schema alone. Tool authors should always include
	// at least one canonical example.
	Examples []*ToolExample `protobuf:"bytes,7,rep,name=examples,proto3" json:"examples,omitempty"`
	// Idempotency hint for retry / dedup logic.
	// Conventional values: "idempotent" | "side_effecting" | "unknown".
	Idempotency string `protobuf:"bytes,8,opt,name=idempotency,proto3" json:"idempotency,omitempty"`
	// Free-text on what failure looks like — when the tool fails, what
	// does the error message contain, and what should the caller do?
	// Helps the LLM diagnose without re-running the call.
	ErrorModes string `protobuf:"bytes,9,opt,name=error_modes,json=errorModes,proto3" json:"error_modes,omitempty"`
	// contains filtered or unexported fields
}

ToolSpec is the FULL spec for one tool. Heavy: contains JSON Schemas + worked examples. Fetched on-demand via DescribeTool; not part of any catalog list.

func (*ToolSpec) Descriptor deprecated

func (*ToolSpec) Descriptor() ([]byte, []int)

Deprecated: Use ToolSpec.ProtoReflect.Descriptor instead.

func (*ToolSpec) GetDescription

func (x *ToolSpec) GetDescription() string

func (*ToolSpec) GetDestructive

func (x *ToolSpec) GetDestructive() bool

func (*ToolSpec) GetErrorModes

func (x *ToolSpec) GetErrorModes() string

func (*ToolSpec) GetExamples

func (x *ToolSpec) GetExamples() []*ToolExample

func (*ToolSpec) GetIdempotency

func (x *ToolSpec) GetIdempotency() string

func (*ToolSpec) GetInputSchema

func (x *ToolSpec) GetInputSchema() *structpb.Struct

func (*ToolSpec) GetName

func (x *ToolSpec) GetName() string

func (*ToolSpec) GetOutputSchema

func (x *ToolSpec) GetOutputSchema() *structpb.Struct

func (*ToolSpec) GetTags

func (x *ToolSpec) GetTags() []string

func (*ToolSpec) ProtoMessage

func (*ToolSpec) ProtoMessage()

func (*ToolSpec) ProtoReflect

func (x *ToolSpec) ProtoReflect() protoreflect.Message

func (*ToolSpec) Reset

func (x *ToolSpec) Reset()

func (*ToolSpec) String

func (x *ToolSpec) String() string

type ToolSummary

type ToolSummary struct {

	// Dotted name. Same convention as Tool.name.
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// ONE LINE optimized for routing decisions. ~120 chars or less
	// by convention. Should answer "when would I pick this?"
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Categories useful for pre-filtering. Conventional values:
	//
	//	read-only       — never mutates state
	//	destructive     — mirrors Tool.destructive; surfaced for symmetry
	//	network         — issues outbound network calls
	//	filesystem      — reads or writes the host filesystem
	//	<toolbox-name>  — every tool tags its toolbox name (git, docker, ...)
	//
	// Plus domain-specific tags the toolbox author chooses.
	Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags,omitempty"`
	// Mirrors Tool.destructive — promoted so callers can decide
	// without combing tags.
	Destructive bool `protobuf:"varint,4,opt,name=destructive,proto3" json:"destructive,omitempty"`
	// contains filtered or unexported fields
}

ToolSummary is a CATALOG ENTRY — enough for the LLM to decide "should I pick this tool?" without paying the full-schema cost. Returned by ListToolSummaries.

The one-line description must answer "when would I call this?" The tags drive pre-filtering ("read-only", "git", "destructive"). Schemas + examples live in ToolSpec, fetched per-tool via DescribeTool right before invocation.

func (*ToolSummary) Descriptor deprecated

func (*ToolSummary) Descriptor() ([]byte, []int)

Deprecated: Use ToolSummary.ProtoReflect.Descriptor instead.

func (*ToolSummary) GetDescription

func (x *ToolSummary) GetDescription() string

func (*ToolSummary) GetDestructive

func (x *ToolSummary) GetDestructive() bool

func (*ToolSummary) GetName

func (x *ToolSummary) GetName() string

func (*ToolSummary) GetTags

func (x *ToolSummary) GetTags() []string

func (*ToolSummary) ProtoMessage

func (*ToolSummary) ProtoMessage()

func (*ToolSummary) ProtoReflect

func (x *ToolSummary) ProtoReflect() protoreflect.Message

func (*ToolSummary) Reset

func (x *ToolSummary) Reset()

func (*ToolSummary) String

func (x *ToolSummary) String() string

type ToolboxClient

type ToolboxClient interface {
	// Identity returns the toolbox's manifest-derived metadata.
	Identity(ctx context.Context, in *IdentityRequest, opts ...grpc.CallOption) (*IdentityResponse, error)
	// Deprecated: Do not use.
	// ListTools returns every tool this toolbox exposes WITH FULL
	// SPECS (schemas, descriptions). Heavy. Kept for transitional
	// consumers and for MCP transcoding; new code should prefer the
	// two-phase pair below — ListToolSummaries (catalog) +
	// DescribeTool (per-tool spec on demand) — which keeps the LLM's
	// routing context small while making per-call descriptions richer.
	ListTools(ctx context.Context, in *ListToolsRequest, opts ...grpc.CallOption) (*ListToolsResponse, error)
	// ListToolSummaries returns lightweight catalog entries — enough
	// for the LLM to pick a tool, but no schemas or examples. The
	// load-bearing routing surface: with N toolboxes and M tools each,
	// every LLM turn pays only the catalog cost (~50 bytes/tool); the
	// heavy spec is fetched per-tool via DescribeTool right before
	// invoking it, then drops out of context.
	//
	// Optional tags_filter pre-selects (e.g. ["read-only"]) so the
	// LLM doesn't even see destructive tools when the goal is read.
	ListToolSummaries(ctx context.Context, in *ListToolSummariesRequest, opts ...grpc.CallOption) (*ListToolSummariesResponse, error)
	// DescribeTool returns the full spec for ONE tool — input/output
	// schemas, multi-paragraph description, examples, error modes.
	// Called on-demand: the LLM picks a tool from the summary catalog,
	// the host fetches DescribeTool for that one, injects it into the
	// next prompt only, then drops it.
	DescribeTool(ctx context.Context, in *DescribeToolRequest, opts ...grpc.CallOption) (*DescribeToolResponse, error)
	// CallTool invokes a tool by name with structured arguments.
	// The result carries either a Content payload, an error, or both
	// (e.g. partial success + warnings).
	CallTool(ctx context.Context, in *CallToolRequest, opts ...grpc.CallOption) (*CallToolResponse, error)
	// ListResources returns every addressable resource the toolbox
	// exposes for read-only context.
	ListResources(ctx context.Context, in *ListResourcesRequest, opts ...grpc.CallOption) (*ListResourcesResponse, error)
	// ReadResource fetches a resource's content by URI.
	ReadResource(ctx context.Context, in *ReadResourceRequest, opts ...grpc.CallOption) (*ReadResourceResponse, error)
	// ListPrompts returns every parametric prompt template the toolbox
	// exposes.
	ListPrompts(ctx context.Context, in *ListPromptsRequest, opts ...grpc.CallOption) (*ListPromptsResponse, error)
	// GetPrompt renders a prompt with the supplied arguments.
	GetPrompt(ctx context.Context, in *GetPromptRequest, opts ...grpc.CallOption) (*GetPromptResponse, error)
}

ToolboxClient is the client API for Toolbox service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

Toolbox is the codefly toolbox contract.

Vocabulary mirrors the Model Context Protocol (MCP) so that an MCP transcoder is a thin wrapper rather than a redesign. The three host- facing primitives are:

Tool      — model-callable function. Input + Output schemas as JSON
            Schema. Side-effecting; gated by the toolbox's policy.
Resource  — addressable read-only context (a file, a query result,
            a config blob). The agent reads; the toolbox decides what
            to expose.
Prompt    — parametric message template. Pre-baked instructions the
            agent can fill and run.

Identity returns the toolbox's name/version/permissions for diagnostics and policy decisions; it's the "who am I and what do I claim" surface.

Roots are the MCP boundary primitive — the host (codefly) tells the toolbox which directories/URIs it may operate over. We surface this as a request field on tool calls rather than a separate RPC; the toolbox enforces (with help from the OS sandbox).

Connect-RPC is the transport — same proto, two encodings (gRPC + Connect's HTTP/JSON). Lets us expose toolboxes over HTTP for browser-based agents without a second contract.

func NewToolboxClient

func NewToolboxClient(cc grpc.ClientConnInterface) ToolboxClient

type ToolboxServer

type ToolboxServer interface {
	// Identity returns the toolbox's manifest-derived metadata.
	Identity(context.Context, *IdentityRequest) (*IdentityResponse, error)
	// Deprecated: Do not use.
	// ListTools returns every tool this toolbox exposes WITH FULL
	// SPECS (schemas, descriptions). Heavy. Kept for transitional
	// consumers and for MCP transcoding; new code should prefer the
	// two-phase pair below — ListToolSummaries (catalog) +
	// DescribeTool (per-tool spec on demand) — which keeps the LLM's
	// routing context small while making per-call descriptions richer.
	ListTools(context.Context, *ListToolsRequest) (*ListToolsResponse, error)
	// ListToolSummaries returns lightweight catalog entries — enough
	// for the LLM to pick a tool, but no schemas or examples. The
	// load-bearing routing surface: with N toolboxes and M tools each,
	// every LLM turn pays only the catalog cost (~50 bytes/tool); the
	// heavy spec is fetched per-tool via DescribeTool right before
	// invoking it, then drops out of context.
	//
	// Optional tags_filter pre-selects (e.g. ["read-only"]) so the
	// LLM doesn't even see destructive tools when the goal is read.
	ListToolSummaries(context.Context, *ListToolSummariesRequest) (*ListToolSummariesResponse, error)
	// DescribeTool returns the full spec for ONE tool — input/output
	// schemas, multi-paragraph description, examples, error modes.
	// Called on-demand: the LLM picks a tool from the summary catalog,
	// the host fetches DescribeTool for that one, injects it into the
	// next prompt only, then drops it.
	DescribeTool(context.Context, *DescribeToolRequest) (*DescribeToolResponse, error)
	// CallTool invokes a tool by name with structured arguments.
	// The result carries either a Content payload, an error, or both
	// (e.g. partial success + warnings).
	CallTool(context.Context, *CallToolRequest) (*CallToolResponse, error)
	// ListResources returns every addressable resource the toolbox
	// exposes for read-only context.
	ListResources(context.Context, *ListResourcesRequest) (*ListResourcesResponse, error)
	// ReadResource fetches a resource's content by URI.
	ReadResource(context.Context, *ReadResourceRequest) (*ReadResourceResponse, error)
	// ListPrompts returns every parametric prompt template the toolbox
	// exposes.
	ListPrompts(context.Context, *ListPromptsRequest) (*ListPromptsResponse, error)
	// GetPrompt renders a prompt with the supplied arguments.
	GetPrompt(context.Context, *GetPromptRequest) (*GetPromptResponse, error)
	// contains filtered or unexported methods
}

ToolboxServer is the server API for Toolbox service. All implementations must embed UnimplementedToolboxServer for forward compatibility.

Toolbox is the codefly toolbox contract.

Vocabulary mirrors the Model Context Protocol (MCP) so that an MCP transcoder is a thin wrapper rather than a redesign. The three host- facing primitives are:

Tool      — model-callable function. Input + Output schemas as JSON
            Schema. Side-effecting; gated by the toolbox's policy.
Resource  — addressable read-only context (a file, a query result,
            a config blob). The agent reads; the toolbox decides what
            to expose.
Prompt    — parametric message template. Pre-baked instructions the
            agent can fill and run.

Identity returns the toolbox's name/version/permissions for diagnostics and policy decisions; it's the "who am I and what do I claim" surface.

Roots are the MCP boundary primitive — the host (codefly) tells the toolbox which directories/URIs it may operate over. We surface this as a request field on tool calls rather than a separate RPC; the toolbox enforces (with help from the OS sandbox).

Connect-RPC is the transport — same proto, two encodings (gRPC + Connect's HTTP/JSON). Lets us expose toolboxes over HTTP for browser-based agents without a second contract.

type UnimplementedToolboxServer

type UnimplementedToolboxServer struct{}

UnimplementedToolboxServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedToolboxServer) CallTool

func (UnimplementedToolboxServer) DescribeTool

func (UnimplementedToolboxServer) GetPrompt

func (UnimplementedToolboxServer) Identity

func (UnimplementedToolboxServer) ListPrompts

func (UnimplementedToolboxServer) ListResources

func (UnimplementedToolboxServer) ListTools

func (UnimplementedToolboxServer) ReadResource

type UnsafeToolboxServer

type UnsafeToolboxServer interface {
	// contains filtered or unexported methods
}

UnsafeToolboxServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ToolboxServer will result in compilation errors.

Jump to

Keyboard shortcuts

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