mindv1connect

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MindServiceCreateSessionProcedure is the fully-qualified name of the MindService's CreateSession
	// RPC.
	MindServiceCreateSessionProcedure = "/mind.v1.MindService/CreateSession"
	// MindServiceListSessionsProcedure is the fully-qualified name of the MindService's ListSessions
	// RPC.
	MindServiceListSessionsProcedure = "/mind.v1.MindService/ListSessions"
	// MindServiceGetSessionDetailProcedure is the fully-qualified name of the MindService's
	// GetSessionDetail RPC.
	MindServiceGetSessionDetailProcedure = "/mind.v1.MindService/GetSessionDetail"
	// MindServiceSendMessageProcedure is the fully-qualified name of the MindService's SendMessage RPC.
	MindServiceSendMessageProcedure = "/mind.v1.MindService/SendMessage"
	// MindServiceCancelOperationProcedure is the fully-qualified name of the MindService's
	// CancelOperation RPC.
	MindServiceCancelOperationProcedure = "/mind.v1.MindService/CancelOperation"
	// MindServiceInitContextProcedure is the fully-qualified name of the MindService's InitContext RPC.
	MindServiceInitContextProcedure = "/mind.v1.MindService/InitContext"
	// MindServiceRunObjectiveProcedure is the fully-qualified name of the MindService's RunObjective
	// RPC.
	MindServiceRunObjectiveProcedure = "/mind.v1.MindService/RunObjective"
	// MindServicePlanAndExecuteProcedure is the fully-qualified name of the MindService's
	// PlanAndExecute RPC.
	MindServicePlanAndExecuteProcedure = "/mind.v1.MindService/PlanAndExecute"
	// MindServiceApproveChangesProcedure is the fully-qualified name of the MindService's
	// ApproveChanges RPC.
	MindServiceApproveChangesProcedure = "/mind.v1.MindService/ApproveChanges"
	// MindServiceRevertChangesProcedure is the fully-qualified name of the MindService's RevertChanges
	// RPC.
	MindServiceRevertChangesProcedure = "/mind.v1.MindService/RevertChanges"
	// MindServiceReadFileProcedure is the fully-qualified name of the MindService's ReadFile RPC.
	MindServiceReadFileProcedure = "/mind.v1.MindService/ReadFile"
	// MindServiceWriteFileProcedure is the fully-qualified name of the MindService's WriteFile RPC.
	MindServiceWriteFileProcedure = "/mind.v1.MindService/WriteFile"
	// MindServiceSearchCodeProcedure is the fully-qualified name of the MindService's SearchCode RPC.
	MindServiceSearchCodeProcedure = "/mind.v1.MindService/SearchCode"
	// MindServiceListSymbolsProcedure is the fully-qualified name of the MindService's ListSymbols RPC.
	MindServiceListSymbolsProcedure = "/mind.v1.MindService/ListSymbols"
	// MindServiceBuildProcedure is the fully-qualified name of the MindService's Build RPC.
	MindServiceBuildProcedure = "/mind.v1.MindService/Build"
	// MindServiceTestProcedure is the fully-qualified name of the MindService's Test RPC.
	MindServiceTestProcedure = "/mind.v1.MindService/Test"
	// MindServiceLintProcedure is the fully-qualified name of the MindService's Lint RPC.
	MindServiceLintProcedure = "/mind.v1.MindService/Lint"
	// MindServiceGetDashboardProcedure is the fully-qualified name of the MindService's GetDashboard
	// RPC.
	MindServiceGetDashboardProcedure = "/mind.v1.MindService/GetDashboard"
	// MindServiceGetContextStateProcedure is the fully-qualified name of the MindService's
	// GetContextState RPC.
	MindServiceGetContextStateProcedure = "/mind.v1.MindService/GetContextState"
	// MindServiceGetMemoryProcedure is the fully-qualified name of the MindService's GetMemory RPC.
	MindServiceGetMemoryProcedure = "/mind.v1.MindService/GetMemory"
	// MindServiceGetObjectiveGraphProcedure is the fully-qualified name of the MindService's
	// GetObjectiveGraph RPC.
	MindServiceGetObjectiveGraphProcedure = "/mind.v1.MindService/GetObjectiveGraph"
	// MindServiceGetTraceProcedure is the fully-qualified name of the MindService's GetTrace RPC.
	MindServiceGetTraceProcedure = "/mind.v1.MindService/GetTrace"
	// MindServiceGetMetricsProcedure is the fully-qualified name of the MindService's GetMetrics RPC.
	MindServiceGetMetricsProcedure = "/mind.v1.MindService/GetMetrics"
	// MindServiceGetCostBreakdownProcedure is the fully-qualified name of the MindService's
	// GetCostBreakdown RPC.
	MindServiceGetCostBreakdownProcedure = "/mind.v1.MindService/GetCostBreakdown"
	// MindServiceGetSymbolMapProcedure is the fully-qualified name of the MindService's GetSymbolMap
	// RPC.
	MindServiceGetSymbolMapProcedure = "/mind.v1.MindService/GetSymbolMap"
	// MindServiceGetFileChangesProcedure is the fully-qualified name of the MindService's
	// GetFileChanges RPC.
	MindServiceGetFileChangesProcedure = "/mind.v1.MindService/GetFileChanges"
	// MindServiceGetLastSummaryProcedure is the fully-qualified name of the MindService's
	// GetLastSummary RPC.
	MindServiceGetLastSummaryProcedure = "/mind.v1.MindService/GetLastSummary"
	// MindServiceGetRulesProcedure is the fully-qualified name of the MindService's GetRules RPC.
	MindServiceGetRulesProcedure = "/mind.v1.MindService/GetRules"
	// MindServiceGetLLMCallsProcedure is the fully-qualified name of the MindService's GetLLMCalls RPC.
	MindServiceGetLLMCallsProcedure = "/mind.v1.MindService/GetLLMCalls"
	// MindServiceGetMiddlewareProcedure is the fully-qualified name of the MindService's GetMiddleware
	// RPC.
	MindServiceGetMiddlewareProcedure = "/mind.v1.MindService/GetMiddleware"
	// MindServiceStreamEventsProcedure is the fully-qualified name of the MindService's StreamEvents
	// RPC.
	MindServiceStreamEventsProcedure = "/mind.v1.MindService/StreamEvents"
)

These constants are the fully-qualified names of the RPCs defined in this package. They're exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.

Note that these are different from the fully-qualified method names used by google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to reflection-formatted method names, remove the leading slash and convert the remaining slash to a period.

View Source
const (
	// MindServiceName is the fully-qualified name of the MindService service.
	MindServiceName = "mind.v1.MindService"
)

Variables

This section is empty.

Functions

func NewMindServiceHandler

func NewMindServiceHandler(svc MindServiceHandler, opts ...connect.HandlerOption) (string, http.Handler)

NewMindServiceHandler builds an HTTP handler from the service implementation. It returns the path on which to mount the handler and the handler itself.

By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf and JSON codecs. They also support gzip compression.

Types

type MindServiceClient

type MindServiceClient interface {
	// CreateSession opens a new session scoped to a working directory.
	// All subsequent RPCs reference this session_id.
	CreateSession(context.Context, *connect.Request[v1.CreateSessionRequest]) (*connect.Response[v1.CreateSessionResponse], error)
	// ListSessions returns recent sessions.
	ListSessions(context.Context, *connect.Request[v1.ListSessionsRequest]) (*connect.Response[v1.ListSessionsResponse], error)
	// GetSession returns details of a specific session.
	GetSessionDetail(context.Context, *connect.Request[v1.GetSessionDetailRequest]) (*connect.Response[v1.GetSessionDetailResponse], error)
	// SendMessage sends a user message and streams back the response.
	// The stream includes token chunks (for live typing), tool calls,
	// and a final summary event. Supports all input modes:
	//   - plain text (LLM chat)
	//   - /command   (slash command dispatch)
	//   - !command   (bang command dispatch)
	//   - ?question  (read-only ask mode)
	//   - ~plan      (plan-only mode)
	SendMessage(context.Context, *connect.Request[v1.SendMessageRequest]) (*connect.ServerStreamForClient[v1.ChatEvent], error)
	// CancelOperation cancels the currently running operation in a session.
	CancelOperation(context.Context, *connect.Request[v1.CancelOperationRequest]) (*connect.Response[v1.CancelOperationResponse], error)
	// InitContext initializes the codebase context: connects to Gateway,
	// discovers services, indexes files and symbols, detects conventions,
	// builds embeddings, loads rules. Streams progress events.
	InitContext(context.Context, *connect.Request[v1.InitContextRequest]) (*connect.ServerStreamForClient[v1.InitEvent], error)
	// RunObjective executes a single objective (from YAML or inline spec).
	// Streams the full execution lifecycle: iterations, LLM calls, tool
	// calls, file ops, check results, strategy decisions.
	RunObjective(context.Context, *connect.Request[v1.RunObjectiveRequest]) (*connect.ServerStreamForClient[v1.ExecutionEvent], error)
	// PlanAndExecute takes a free-text request, plans it (UNDERSTAND →
	// PLAN → DETAIL), then executes all objectives. Streams planning
	// events followed by execution events.
	PlanAndExecute(context.Context, *connect.Request[v1.PlanAndExecuteRequest]) (*connect.ServerStreamForClient[v1.ExecutionEvent], error)
	// ApproveChanges commits overlay changes to the real filesystem.
	// Only meaningful after a successful run with changes pending.
	ApproveChanges(context.Context, *connect.Request[v1.ApproveChangesRequest]) (*connect.Response[v1.ApproveChangesResponse], error)
	// RevertChanges discards pending overlay changes.
	RevertChanges(context.Context, *connect.Request[v1.RevertChangesRequest]) (*connect.Response[v1.RevertChangesResponse], error)
	// ReadFile reads a workspace file through the session's gateway.
	ReadFile(context.Context, *connect.Request[v1.ReadFileRequest]) (*connect.Response[v1.ReadFileResponse], error)
	// WriteFile writes a workspace file through the session's gateway.
	WriteFile(context.Context, *connect.Request[v1.WriteFileRequest]) (*connect.Response[v1.WriteFileResponse], error)
	// SearchCode searches indexed or gateway-visible source files.
	SearchCode(context.Context, *connect.Request[v1.SearchCodeRequest]) (*connect.Response[v1.SearchCodeResponse], error)
	// ListSymbols returns code symbols known to the session.
	ListSymbols(context.Context, *connect.Request[v1.ListSymbolsRequest]) (*connect.Response[v1.ListSymbolsResponse], error)
	// Build runs the service build through the gateway.
	Build(context.Context, *connect.Request[v1.BuildRequest]) (*connect.Response[v1.BuildResponse], error)
	// Test runs service tests through the gateway.
	Test(context.Context, *connect.Request[v1.TestRequest]) (*connect.Response[v1.TestResponse], error)
	// Lint runs service linting through the gateway.
	Lint(context.Context, *connect.Request[v1.LintRequest]) (*connect.Response[v1.LintResponse], error)
	// GetDashboard returns the session KPI snapshot.
	GetDashboard(context.Context, *connect.Request[v1.GetDashboardRequest]) (*connect.Response[v1.GetDashboardResponse], error)
	// GetContextState returns the prompt/context layers loaded for the session.
	GetContextState(context.Context, *connect.Request[v1.GetContextStateRequest]) (*connect.Response[v1.GetContextStateResponse], error)
	// GetMemory returns Mind's working memory for the session.
	GetMemory(context.Context, *connect.Request[v1.GetMemoryRequest]) (*connect.Response[v1.GetMemoryResponse], error)
	// GetObjectiveGraph returns the current objective DAG.
	GetObjectiveGraph(context.Context, *connect.Request[v1.GetObjectiveGraphRequest]) (*connect.Response[v1.GetObjectiveGraphResponse], error)
	// GetTrace returns the retained execution trace tree.
	GetTrace(context.Context, *connect.Request[v1.GetTraceRequest]) (*connect.Response[v1.GetTraceResponse], error)
	// GetMetrics returns token, cost, and timing metrics.
	GetMetrics(context.Context, *connect.Request[v1.GetMetricsRequest]) (*connect.Response[v1.GetMetricsResponse], error)
	// GetCostBreakdown returns hierarchical cost attribution.
	GetCostBreakdown(context.Context, *connect.Request[v1.GetCostBreakdownRequest]) (*connect.Response[v1.GetCostBreakdownResponse], error)
	// GetSymbolMap returns the symbol map available to Mind.
	GetSymbolMap(context.Context, *connect.Request[v1.GetSymbolMapRequest]) (*connect.Response[v1.GetSymbolMapResponse], error)
	// GetFileChanges returns file changes retained for the session.
	GetFileChanges(context.Context, *connect.Request[v1.GetFileChangesRequest]) (*connect.Response[v1.GetFileChangesResponse], error)
	// GetLastSummary returns the latest completed-run summary.
	GetLastSummary(context.Context, *connect.Request[v1.GetLastSummaryRequest]) (*connect.Response[v1.GetLastSummaryResponse], error)
	// GetRules returns rules loaded into the current context.
	GetRules(context.Context, *connect.Request[v1.GetRulesRequest]) (*connect.Response[v1.GetRulesResponse], error)
	// GetLLMCalls returns the retained model-call log.
	GetLLMCalls(context.Context, *connect.Request[v1.GetLLMCallsRequest]) (*connect.Response[v1.GetLLMCallsResponse], error)
	// GetMiddleware returns the middleware pipeline state.
	GetMiddleware(context.Context, *connect.Request[v1.GetMiddlewareRequest]) (*connect.Response[v1.GetMiddlewareResponse], error)
	// StreamEvents pushes all real-time events: LLM calls, tool calls,
	// file ops, check results, agent lifecycle, errors. Filterable by
	// kind and agent. This is the single unified event bus.
	StreamEvents(context.Context, *connect.Request[v1.StreamEventsRequest]) (*connect.ServerStreamForClient[v1.MindEvent], error)
}

MindServiceClient is a client for the mind.v1.MindService service.

func NewMindServiceClient

func NewMindServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) MindServiceClient

NewMindServiceClient constructs a client for the mind.v1.MindService service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb() options.

The URL supplied here should be the base URL for the Connect or gRPC server (for example, http://api.acme.com or https://acme.com/grpc).

type MindServiceHandler

type MindServiceHandler interface {
	// CreateSession opens a new session scoped to a working directory.
	// All subsequent RPCs reference this session_id.
	CreateSession(context.Context, *connect.Request[v1.CreateSessionRequest]) (*connect.Response[v1.CreateSessionResponse], error)
	// ListSessions returns recent sessions.
	ListSessions(context.Context, *connect.Request[v1.ListSessionsRequest]) (*connect.Response[v1.ListSessionsResponse], error)
	// GetSession returns details of a specific session.
	GetSessionDetail(context.Context, *connect.Request[v1.GetSessionDetailRequest]) (*connect.Response[v1.GetSessionDetailResponse], error)
	// SendMessage sends a user message and streams back the response.
	// The stream includes token chunks (for live typing), tool calls,
	// and a final summary event. Supports all input modes:
	//   - plain text (LLM chat)
	//   - /command   (slash command dispatch)
	//   - !command   (bang command dispatch)
	//   - ?question  (read-only ask mode)
	//   - ~plan      (plan-only mode)
	SendMessage(context.Context, *connect.Request[v1.SendMessageRequest], *connect.ServerStream[v1.ChatEvent]) error
	// CancelOperation cancels the currently running operation in a session.
	CancelOperation(context.Context, *connect.Request[v1.CancelOperationRequest]) (*connect.Response[v1.CancelOperationResponse], error)
	// InitContext initializes the codebase context: connects to Gateway,
	// discovers services, indexes files and symbols, detects conventions,
	// builds embeddings, loads rules. Streams progress events.
	InitContext(context.Context, *connect.Request[v1.InitContextRequest], *connect.ServerStream[v1.InitEvent]) error
	// RunObjective executes a single objective (from YAML or inline spec).
	// Streams the full execution lifecycle: iterations, LLM calls, tool
	// calls, file ops, check results, strategy decisions.
	RunObjective(context.Context, *connect.Request[v1.RunObjectiveRequest], *connect.ServerStream[v1.ExecutionEvent]) error
	// PlanAndExecute takes a free-text request, plans it (UNDERSTAND →
	// PLAN → DETAIL), then executes all objectives. Streams planning
	// events followed by execution events.
	PlanAndExecute(context.Context, *connect.Request[v1.PlanAndExecuteRequest], *connect.ServerStream[v1.ExecutionEvent]) error
	// ApproveChanges commits overlay changes to the real filesystem.
	// Only meaningful after a successful run with changes pending.
	ApproveChanges(context.Context, *connect.Request[v1.ApproveChangesRequest]) (*connect.Response[v1.ApproveChangesResponse], error)
	// RevertChanges discards pending overlay changes.
	RevertChanges(context.Context, *connect.Request[v1.RevertChangesRequest]) (*connect.Response[v1.RevertChangesResponse], error)
	// ReadFile reads a workspace file through the session's gateway.
	ReadFile(context.Context, *connect.Request[v1.ReadFileRequest]) (*connect.Response[v1.ReadFileResponse], error)
	// WriteFile writes a workspace file through the session's gateway.
	WriteFile(context.Context, *connect.Request[v1.WriteFileRequest]) (*connect.Response[v1.WriteFileResponse], error)
	// SearchCode searches indexed or gateway-visible source files.
	SearchCode(context.Context, *connect.Request[v1.SearchCodeRequest]) (*connect.Response[v1.SearchCodeResponse], error)
	// ListSymbols returns code symbols known to the session.
	ListSymbols(context.Context, *connect.Request[v1.ListSymbolsRequest]) (*connect.Response[v1.ListSymbolsResponse], error)
	// Build runs the service build through the gateway.
	Build(context.Context, *connect.Request[v1.BuildRequest]) (*connect.Response[v1.BuildResponse], error)
	// Test runs service tests through the gateway.
	Test(context.Context, *connect.Request[v1.TestRequest]) (*connect.Response[v1.TestResponse], error)
	// Lint runs service linting through the gateway.
	Lint(context.Context, *connect.Request[v1.LintRequest]) (*connect.Response[v1.LintResponse], error)
	// GetDashboard returns the session KPI snapshot.
	GetDashboard(context.Context, *connect.Request[v1.GetDashboardRequest]) (*connect.Response[v1.GetDashboardResponse], error)
	// GetContextState returns the prompt/context layers loaded for the session.
	GetContextState(context.Context, *connect.Request[v1.GetContextStateRequest]) (*connect.Response[v1.GetContextStateResponse], error)
	// GetMemory returns Mind's working memory for the session.
	GetMemory(context.Context, *connect.Request[v1.GetMemoryRequest]) (*connect.Response[v1.GetMemoryResponse], error)
	// GetObjectiveGraph returns the current objective DAG.
	GetObjectiveGraph(context.Context, *connect.Request[v1.GetObjectiveGraphRequest]) (*connect.Response[v1.GetObjectiveGraphResponse], error)
	// GetTrace returns the retained execution trace tree.
	GetTrace(context.Context, *connect.Request[v1.GetTraceRequest]) (*connect.Response[v1.GetTraceResponse], error)
	// GetMetrics returns token, cost, and timing metrics.
	GetMetrics(context.Context, *connect.Request[v1.GetMetricsRequest]) (*connect.Response[v1.GetMetricsResponse], error)
	// GetCostBreakdown returns hierarchical cost attribution.
	GetCostBreakdown(context.Context, *connect.Request[v1.GetCostBreakdownRequest]) (*connect.Response[v1.GetCostBreakdownResponse], error)
	// GetSymbolMap returns the symbol map available to Mind.
	GetSymbolMap(context.Context, *connect.Request[v1.GetSymbolMapRequest]) (*connect.Response[v1.GetSymbolMapResponse], error)
	// GetFileChanges returns file changes retained for the session.
	GetFileChanges(context.Context, *connect.Request[v1.GetFileChangesRequest]) (*connect.Response[v1.GetFileChangesResponse], error)
	// GetLastSummary returns the latest completed-run summary.
	GetLastSummary(context.Context, *connect.Request[v1.GetLastSummaryRequest]) (*connect.Response[v1.GetLastSummaryResponse], error)
	// GetRules returns rules loaded into the current context.
	GetRules(context.Context, *connect.Request[v1.GetRulesRequest]) (*connect.Response[v1.GetRulesResponse], error)
	// GetLLMCalls returns the retained model-call log.
	GetLLMCalls(context.Context, *connect.Request[v1.GetLLMCallsRequest]) (*connect.Response[v1.GetLLMCallsResponse], error)
	// GetMiddleware returns the middleware pipeline state.
	GetMiddleware(context.Context, *connect.Request[v1.GetMiddlewareRequest]) (*connect.Response[v1.GetMiddlewareResponse], error)
	// StreamEvents pushes all real-time events: LLM calls, tool calls,
	// file ops, check results, agent lifecycle, errors. Filterable by
	// kind and agent. This is the single unified event bus.
	StreamEvents(context.Context, *connect.Request[v1.StreamEventsRequest], *connect.ServerStream[v1.MindEvent]) error
}

MindServiceHandler is an implementation of the mind.v1.MindService service.

type UnimplementedMindServiceHandler

type UnimplementedMindServiceHandler struct{}

UnimplementedMindServiceHandler returns CodeUnimplemented from all methods.

func (UnimplementedMindServiceHandler) Lint

func (UnimplementedMindServiceHandler) Test

Jump to

Keyboard shortcuts

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