v1

package
v0.0.55 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	AgentService_GetConfig_FullMethodName        = "/devloop.v1.AgentService/GetConfig"
	AgentService_GetRule_FullMethodName          = "/devloop.v1.AgentService/GetRule"
	AgentService_TriggerRule_FullMethodName      = "/devloop.v1.AgentService/TriggerRule"
	AgentService_ListWatchedPaths_FullMethodName = "/devloop.v1.AgentService/ListWatchedPaths"
	AgentService_StreamLogs_FullMethodName       = "/devloop.v1.AgentService/StreamLogs"
)

Variables

View Source
var AgentService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "devloop.v1.AgentService",
	HandlerType: (*AgentServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetConfig",
			Handler:    _AgentService_GetConfig_Handler,
		},
		{
			MethodName: "GetRule",
			Handler:    _AgentService_GetRule_Handler,
		},
		{
			MethodName: "TriggerRule",
			Handler:    _AgentService_TriggerRule_Handler,
		},
		{
			MethodName: "ListWatchedPaths",
			Handler:    _AgentService_ListWatchedPaths_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "StreamLogs",
			Handler:       _AgentService_StreamLogs_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "devloop/v1/agents.proto",
}

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

View Source
var File_devloop_v1_agents_proto protoreflect.FileDescriptor
View Source
var File_devloop_v1_models_proto protoreflect.FileDescriptor

Functions

func RegisterAgentServiceHandler

func RegisterAgentServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAgentServiceHandler registers the http handlers for service AgentService to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAgentServiceHandlerClient

func RegisterAgentServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AgentServiceClient) error

RegisterAgentServiceHandlerClient registers the http handlers for service AgentService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AgentServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AgentServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AgentServiceClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterAgentServiceHandlerFromEndpoint

func RegisterAgentServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAgentServiceHandlerFromEndpoint is same as RegisterAgentServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAgentServiceHandlerServer

func RegisterAgentServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AgentServiceServer) error

RegisterAgentServiceHandlerServer registers the http handlers for service AgentService to "mux". UnaryRPC :call AgentServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAgentServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterAgentServiceServer

func RegisterAgentServiceServer(s grpc.ServiceRegistrar, srv AgentServiceServer)

Types

type AgentServiceClient

type AgentServiceClient interface {
	// Retrieve the complete devloop configuration for a project to understand
	// available rules, commands, file watch patterns, and project settings.
	//
	// Essential information provided:
	// - Available build/test rules (rules[].name)
	// - Commands executed by each rule (rules[].commands)
	// - File patterns that trigger each rule (rules[].watch patterns)
	// - Project settings like colors, logging, debouncing
	//
	// Usage Examples:
	// - Discover available rules: Parse rules[].name from response
	// - Find test commands: Look for rules with "test" in name or commands
	// - Understand file triggers: Examine rules[].watch.patterns
	//
	// Response Format: JSON string containing the complete .devloop.yaml content
	// with resolved settings and rule definitions.
	// mcp_tool_name:get_config
	GetConfig(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
	// Get the current execution status and history of a specific rule.
	// Use this to monitor build/test progress and check for failures.
	//
	// Status Information Provided:
	// - Whether the rule is currently running
	// - When the current/last execution started
	// - Result of the last execution (SUCCESS, FAILED, RUNNING, IDLE)
	// - Execution history timestamps
	//
	// Common Use Cases:
	// - Check if a build is still running after triggering
	// - Verify if tests passed or failed
	// - Monitor long-running development servers
	// - Debug why a rule isn't executing
	//
	// Returns: Detailed status including timing and execution results
	// mcp_tool_name:get_rule_status
	GetRule(ctx context.Context, in *GetRuleRequest, opts ...grpc.CallOption) (*GetRuleResponse, error)
	// Manually execute a specific rule to run builds, tests, or other commands.
	// This bypasses file watching and immediately starts the rule's command sequence.
	//
	// Trigger Behavior:
	// - Terminates any currently running instance of the rule
	// - Executes all commands in the rule definition sequentially
	// - Updates rule status to RUNNING, then SUCCESS/FAILED based on results
	// - Generates log output that can be retrieved via streaming endpoints
	//
	// Common Use Cases:
	// - Run builds on demand ("trigger the backend build")
	// - Execute test suites ("run the test rule")
	// - Restart development servers ("trigger the dev-server rule")
	// - Force regeneration ("trigger the protobuf rule")
	//
	// Returns: Immediate response indicating if trigger was accepted
	// Use GetRule() to monitor actual execution progress
	// mcp_tool_name:trigger_rule
	TriggerRule(ctx context.Context, in *TriggerRuleRequest, opts ...grpc.CallOption) (*TriggerRuleResponse, error)
	// List all file glob patterns being monitored by a project for automatic rule triggering.
	// Use this to understand what files cause rebuilds and which rules will execute.
	//
	// Pattern Information:
	// - All include/exclude patterns from all rules combined
	// - Glob syntax: **/*.go, src/**/*.js, **/test_*.py, etc.
	// - Patterns are resolved relative to the project root
	//
	// Common Use Cases:
	// - Understand what file changes trigger builds
	// - Debug why edits aren't triggering rules
	// - Plan file organization to optimize build triggers
	// - Analyze project structure and dependencies
	//
	// Returns: Array of glob patterns currently being watched
	// mcp_tool_name:list_watched_paths
	ListWatchedPaths(ctx context.Context, in *ListWatchedPathsRequest, opts ...grpc.CallOption) (*ListWatchedPathsResponse, error)
	// Stream real-time logs for a specific rule in a project.
	// mcp_tool_name:stream_logs
	StreamLogs(ctx context.Context, in *StreamLogsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamLogsResponse], error)
}

AgentServiceClient is the client API for AgentService 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.

AgentService defines the gRPC service for clients to interact with a single devloop instance for automated development workflows and monitoring.

Common Workflow Patterns: 1. GetConfig -> GetConfig() -> understand available rules 2. Build/Test: TriggerRule(rule_name) -> GetRule() -> monitor progress 3. Debugging: GetRule() -> ReadFileContent() -> analyze issues 4. Monitoring: ListWatchedPaths() -> understand what files trigger rebuilds

type AgentServiceServer

type AgentServiceServer interface {
	// Retrieve the complete devloop configuration for a project to understand
	// available rules, commands, file watch patterns, and project settings.
	//
	// Essential information provided:
	// - Available build/test rules (rules[].name)
	// - Commands executed by each rule (rules[].commands)
	// - File patterns that trigger each rule (rules[].watch patterns)
	// - Project settings like colors, logging, debouncing
	//
	// Usage Examples:
	// - Discover available rules: Parse rules[].name from response
	// - Find test commands: Look for rules with "test" in name or commands
	// - Understand file triggers: Examine rules[].watch.patterns
	//
	// Response Format: JSON string containing the complete .devloop.yaml content
	// with resolved settings and rule definitions.
	// mcp_tool_name:get_config
	GetConfig(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
	// Get the current execution status and history of a specific rule.
	// Use this to monitor build/test progress and check for failures.
	//
	// Status Information Provided:
	// - Whether the rule is currently running
	// - When the current/last execution started
	// - Result of the last execution (SUCCESS, FAILED, RUNNING, IDLE)
	// - Execution history timestamps
	//
	// Common Use Cases:
	// - Check if a build is still running after triggering
	// - Verify if tests passed or failed
	// - Monitor long-running development servers
	// - Debug why a rule isn't executing
	//
	// Returns: Detailed status including timing and execution results
	// mcp_tool_name:get_rule_status
	GetRule(context.Context, *GetRuleRequest) (*GetRuleResponse, error)
	// Manually execute a specific rule to run builds, tests, or other commands.
	// This bypasses file watching and immediately starts the rule's command sequence.
	//
	// Trigger Behavior:
	// - Terminates any currently running instance of the rule
	// - Executes all commands in the rule definition sequentially
	// - Updates rule status to RUNNING, then SUCCESS/FAILED based on results
	// - Generates log output that can be retrieved via streaming endpoints
	//
	// Common Use Cases:
	// - Run builds on demand ("trigger the backend build")
	// - Execute test suites ("run the test rule")
	// - Restart development servers ("trigger the dev-server rule")
	// - Force regeneration ("trigger the protobuf rule")
	//
	// Returns: Immediate response indicating if trigger was accepted
	// Use GetRule() to monitor actual execution progress
	// mcp_tool_name:trigger_rule
	TriggerRule(context.Context, *TriggerRuleRequest) (*TriggerRuleResponse, error)
	// List all file glob patterns being monitored by a project for automatic rule triggering.
	// Use this to understand what files cause rebuilds and which rules will execute.
	//
	// Pattern Information:
	// - All include/exclude patterns from all rules combined
	// - Glob syntax: **/*.go, src/**/*.js, **/test_*.py, etc.
	// - Patterns are resolved relative to the project root
	//
	// Common Use Cases:
	// - Understand what file changes trigger builds
	// - Debug why edits aren't triggering rules
	// - Plan file organization to optimize build triggers
	// - Analyze project structure and dependencies
	//
	// Returns: Array of glob patterns currently being watched
	// mcp_tool_name:list_watched_paths
	ListWatchedPaths(context.Context, *ListWatchedPathsRequest) (*ListWatchedPathsResponse, error)
	// Stream real-time logs for a specific rule in a project.
	// mcp_tool_name:stream_logs
	StreamLogs(*StreamLogsRequest, grpc.ServerStreamingServer[StreamLogsResponse]) error
}

AgentServiceServer is the server API for AgentService service. All implementations should embed UnimplementedAgentServiceServer for forward compatibility.

AgentService defines the gRPC service for clients to interact with a single devloop instance for automated development workflows and monitoring.

Common Workflow Patterns: 1. GetConfig -> GetConfig() -> understand available rules 2. Build/Test: TriggerRule(rule_name) -> GetRule() -> monitor progress 3. Debugging: GetRule() -> ReadFileContent() -> analyze issues 4. Monitoring: ListWatchedPaths() -> understand what files trigger rebuilds

type AgentService_StreamLogsClient

type AgentService_StreamLogsClient = grpc.ServerStreamingClient[StreamLogsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type AgentService_StreamLogsServer

type AgentService_StreamLogsServer = grpc.ServerStreamingServer[StreamLogsResponse]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type Config

type Config struct {
	ProjectId string    `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	Settings  *Settings `protobuf:"bytes,2,opt,name=settings,proto3" json:"settings,omitempty"`
	Rules     []*Rule   `protobuf:"bytes,3,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

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

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetProjectId

func (x *Config) GetProjectId() string

func (*Config) GetRules

func (x *Config) GetRules() []*Rule

func (*Config) GetSettings

func (x *Config) GetSettings() *Settings

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

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

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type CycleDetectionSettings added in v0.0.51

type CycleDetectionSettings struct {

	// Whether to enable cycle detection (default: true)
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Whether to perform static validation at startup (default: true)
	StaticValidation bool `protobuf:"varint,2,opt,name=static_validation,json=staticValidation,proto3" json:"static_validation,omitempty"`
	// Whether to enable dynamic rate limiting (default: false for now)
	DynamicProtection bool `protobuf:"varint,3,opt,name=dynamic_protection,json=dynamicProtection,proto3" json:"dynamic_protection,omitempty"`
	// Maximum triggers per minute before rate limiting kicks in (default: 10)
	MaxTriggersPerMinute uint32 `` /* 126-byte string literal not displayed */
	// Maximum chain depth for trigger relationships (default: 5)
	MaxChainDepth uint32 `protobuf:"varint,5,opt,name=max_chain_depth,json=maxChainDepth,proto3" json:"max_chain_depth,omitempty"`
	// Time window for file modification frequency detection in seconds (default: 60)
	FileThrashWindowSeconds uint32 `` /* 135-byte string literal not displayed */
	// Number of modifications within window to consider "thrashing" (default: 5)
	FileThrashThreshold uint32 `protobuf:"varint,7,opt,name=file_thrash_threshold,json=fileThrashThreshold,proto3" json:"file_thrash_threshold,omitempty"`
	// contains filtered or unexported fields
}

Settings for cycle detection and prevention

func (*CycleDetectionSettings) Descriptor deprecated added in v0.0.51

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

Deprecated: Use CycleDetectionSettings.ProtoReflect.Descriptor instead.

func (*CycleDetectionSettings) GetDynamicProtection added in v0.0.51

func (x *CycleDetectionSettings) GetDynamicProtection() bool

func (*CycleDetectionSettings) GetEnabled added in v0.0.51

func (x *CycleDetectionSettings) GetEnabled() bool

func (*CycleDetectionSettings) GetFileThrashThreshold added in v0.0.51

func (x *CycleDetectionSettings) GetFileThrashThreshold() uint32

func (*CycleDetectionSettings) GetFileThrashWindowSeconds added in v0.0.51

func (x *CycleDetectionSettings) GetFileThrashWindowSeconds() uint32

func (*CycleDetectionSettings) GetMaxChainDepth added in v0.0.51

func (x *CycleDetectionSettings) GetMaxChainDepth() uint32

func (*CycleDetectionSettings) GetMaxTriggersPerMinute added in v0.0.51

func (x *CycleDetectionSettings) GetMaxTriggersPerMinute() uint32

func (*CycleDetectionSettings) GetStaticValidation added in v0.0.51

func (x *CycleDetectionSettings) GetStaticValidation() bool

func (*CycleDetectionSettings) ProtoMessage added in v0.0.51

func (*CycleDetectionSettings) ProtoMessage()

func (*CycleDetectionSettings) ProtoReflect added in v0.0.51

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

func (*CycleDetectionSettings) Reset added in v0.0.51

func (x *CycleDetectionSettings) Reset()

func (*CycleDetectionSettings) String added in v0.0.51

func (x *CycleDetectionSettings) String() string

type GetConfigRequest

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

GetConfigRequest retrieves the complete configuration for a specific project.

func (*GetConfigRequest) Descriptor deprecated

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

Deprecated: Use GetConfigRequest.ProtoReflect.Descriptor instead.

func (*GetConfigRequest) ProtoMessage

func (*GetConfigRequest) ProtoMessage()

func (*GetConfigRequest) ProtoReflect

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

func (*GetConfigRequest) Reset

func (x *GetConfigRequest) Reset()

func (*GetConfigRequest) String

func (x *GetConfigRequest) String() string

type GetConfigResponse

type GetConfigResponse struct {

	// Complete project configuration as JSON string.
	// Contains: settings (logging, colors), rules (name, commands, watch patterns)
	// Parse this JSON to understand available rule names and their configurations.
	Config *Config `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	// contains filtered or unexported fields
}

GetConfigResponse contains the complete project configuration.

func (*GetConfigResponse) Descriptor deprecated

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

Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.

func (*GetConfigResponse) GetConfig

func (x *GetConfigResponse) GetConfig() *Config

func (*GetConfigResponse) ProtoMessage

func (*GetConfigResponse) ProtoMessage()

func (*GetConfigResponse) ProtoReflect

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

func (*GetConfigResponse) Reset

func (x *GetConfigResponse) Reset()

func (*GetConfigResponse) String

func (x *GetConfigResponse) String() string

type GetRuleRequest

type GetRuleRequest struct {

	// Required: The name of the rule to check status for.
	// Must match a rule name from GetConfig() response (rules[].name).
	// Examples: "backend", "frontend", "tests", "build"
	RuleName string `protobuf:"bytes,1,opt,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"`
	// contains filtered or unexported fields
}

GetRuleRequest retrieves the execution status of a specific rule.

func (*GetRuleRequest) Descriptor deprecated

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

Deprecated: Use GetRuleRequest.ProtoReflect.Descriptor instead.

func (*GetRuleRequest) GetRuleName

func (x *GetRuleRequest) GetRuleName() string

func (*GetRuleRequest) ProtoMessage

func (*GetRuleRequest) ProtoMessage()

func (*GetRuleRequest) ProtoReflect

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

func (*GetRuleRequest) Reset

func (x *GetRuleRequest) Reset()

func (*GetRuleRequest) String

func (x *GetRuleRequest) String() string

type GetRuleResponse

type GetRuleResponse struct {

	// Detailed status information including execution state, timing, and results.
	// Check rule_status.is_running to see if currently executing.
	// Check rule_status.last_build_status for SUCCESS/FAILED/IDLE state.
	Rule *Rule `protobuf:"bytes,1,opt,name=rule,proto3" json:"rule,omitempty"`
	// contains filtered or unexported fields
}

GetRuleResponse contains the current status and history of a rule.

func (*GetRuleResponse) Descriptor deprecated

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

Deprecated: Use GetRuleResponse.ProtoReflect.Descriptor instead.

func (*GetRuleResponse) GetRule

func (x *GetRuleResponse) GetRule() *Rule

func (*GetRuleResponse) ProtoMessage

func (*GetRuleResponse) ProtoMessage()

func (*GetRuleResponse) ProtoReflect

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

func (*GetRuleResponse) Reset

func (x *GetRuleResponse) Reset()

func (*GetRuleResponse) String

func (x *GetRuleResponse) String() string

type ListWatchedPathsRequest

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

ListWatchedPathsRequest retrieves all file patterns being monitored by a project.

func (*ListWatchedPathsRequest) Descriptor deprecated

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

Deprecated: Use ListWatchedPathsRequest.ProtoReflect.Descriptor instead.

func (*ListWatchedPathsRequest) ProtoMessage

func (*ListWatchedPathsRequest) ProtoMessage()

func (*ListWatchedPathsRequest) ProtoReflect

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

func (*ListWatchedPathsRequest) Reset

func (x *ListWatchedPathsRequest) Reset()

func (*ListWatchedPathsRequest) String

func (x *ListWatchedPathsRequest) String() string

type ListWatchedPathsResponse

type ListWatchedPathsResponse struct {

	// Array of glob patterns that trigger rule execution when matched files change.
	// Examples: "**/*.go", "src/**/*.js", "package.json", "**/test_*.py"
	Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
	// contains filtered or unexported fields
}

ListWatchedPathsResponse contains all file patterns being monitored.

func (*ListWatchedPathsResponse) Descriptor deprecated

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

Deprecated: Use ListWatchedPathsResponse.ProtoReflect.Descriptor instead.

func (*ListWatchedPathsResponse) GetPaths

func (x *ListWatchedPathsResponse) GetPaths() []string

func (*ListWatchedPathsResponse) ProtoMessage

func (*ListWatchedPathsResponse) ProtoMessage()

func (*ListWatchedPathsResponse) ProtoReflect

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

func (*ListWatchedPathsResponse) Reset

func (x *ListWatchedPathsResponse) Reset()

func (*ListWatchedPathsResponse) String

func (x *ListWatchedPathsResponse) String() string

type LogLine

type LogLine struct {

	// The project that generated this log line
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// The specific rule that produced this output (e.g., "backend", "frontend", "tests")
	RuleName string `protobuf:"bytes,2,opt,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"`
	// The actual log content/output line from the command
	// This includes all stdout/stderr from the rule's commands
	Line string `protobuf:"bytes,3,opt,name=line,proto3" json:"line,omitempty"`
	// When this log line was generated (Unix timestamp in milliseconds)
	// Use this for time-based filtering and chronological ordering
	Timestamp int64 `protobuf:"varint,4,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

LogLine represents a single log entry from a rule execution. Used for streaming real-time logs and retrieving historical log data.

func (*LogLine) Descriptor deprecated

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

Deprecated: Use LogLine.ProtoReflect.Descriptor instead.

func (*LogLine) GetLine

func (x *LogLine) GetLine() string

func (*LogLine) GetProjectId

func (x *LogLine) GetProjectId() string

func (*LogLine) GetRuleName

func (x *LogLine) GetRuleName() string

func (*LogLine) GetTimestamp

func (x *LogLine) GetTimestamp() int64

func (*LogLine) ProtoMessage

func (*LogLine) ProtoMessage()

func (*LogLine) ProtoReflect

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

func (*LogLine) Reset

func (x *LogLine) Reset()

func (*LogLine) String

func (x *LogLine) String() string

type ProjectInfo

type ProjectInfo struct {

	// Unique identifier for the project. This can be:
	// - Manually set in devloop.yaml settings.project_id (recommended for AI tools)
	// - Auto-generated from the project directory path (fallback)
	// Examples: "my-backend", "frontend-app", "user-service"
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// Absolute path to the project's root directory containing .devloop.yaml
	// This is where all relative paths in commands and file operations are resolved from.
	// Example: "/Users/dev/projects/my-app"
	ProjectRoot string `protobuf:"bytes,2,opt,name=project_root,json=projectRoot,proto3" json:"project_root,omitempty"`
	// contains filtered or unexported fields
}

ProjectInfo represents the information about a registered devloop project. This contains the core identification and location data for a project.

func (*ProjectInfo) Descriptor deprecated

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

Deprecated: Use ProjectInfo.ProtoReflect.Descriptor instead.

func (*ProjectInfo) GetProjectId

func (x *ProjectInfo) GetProjectId() string

func (*ProjectInfo) GetProjectRoot

func (x *ProjectInfo) GetProjectRoot() string

func (*ProjectInfo) ProtoMessage

func (*ProjectInfo) ProtoMessage()

func (*ProjectInfo) ProtoReflect

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

func (*ProjectInfo) Reset

func (x *ProjectInfo) Reset()

func (*ProjectInfo) String

func (x *ProjectInfo) String() string

type Rule

type Rule struct {

	// The project this rule belongs to
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// The rule name (e.g., "backend", "frontend", "tests")
	// Must match a rule name from the project's .devloop.yaml configuration
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// The commands that will be executed for this rule
	Commands []string `protobuf:"bytes,3,rep,name=commands,proto3" json:"commands,omitempty"`
	// The rule matchers and the actions to take for them
	Watch []*RuleMatcher `protobuf:"bytes,4,rep,name=watch,proto3" json:"watch,omitempty"`
	// What to do when a file does not match any pattern by default
	DefaultAction string `protobuf:"bytes,5,opt,name=default_action,json=defaultAction,proto3" json:"default_action,omitempty"`
	// Prefix for this rule
	Prefix string `protobuf:"bytes,6,opt,name=prefix,proto3" json:"prefix,omitempty"`
	// The workdir for this rule.  If not specified then will default to the directory where the devloop config is in.
	WorkDir string `protobuf:"bytes,7,opt,name=work_dir,json=workDir,proto3" json:"work_dir,omitempty"`
	// Whether to skip running on init (default false = will run on init)
	// Set to true to prevent rule from executing when devloop starts up
	// Example: skip_run_on_init: true
	SkipRunOnInit bool `protobuf:"varint,8,opt,name=skip_run_on_init,json=skipRunOnInit,proto3" json:"skip_run_on_init,omitempty"`
	// Whether the rule will have verbose logs or not
	Verbose *bool `protobuf:"varint,9,opt,name=verbose,proto3,oneof" json:"verbose,omitempty"`
	// Delay for debouncing if rules matched multiple times in rapid successession
	DebounceDelay *uint64 `protobuf:"varint,10,opt,name=debounce_delay,json=debounceDelay,proto3,oneof" json:"debounce_delay,omitempty"`
	// Color to use to show the logs for this rule
	Color string            `protobuf:"bytes,11,opt,name=color,proto3" json:"color,omitempty"`
	Env   map[string]string `` /* 134-byte string literal not displayed */
	// Per-rule cycle protection override (if not set, inherits from global settings)
	// Set to false to disable cycle protection for this specific rule
	CycleProtection *bool `protobuf:"varint,13,opt,name=cycle_protection,json=cycleProtection,proto3,oneof" json:"cycle_protection,omitempty"`
	// Status of this rule
	Status *RuleStatus `protobuf:"bytes,14,opt,name=status,proto3" json:"status,omitempty"`
	// Whether to exit devloop when this rule fails startup (default: false)
	// Set to true to use legacy behavior where devloop exits on startup failure
	ExitOnFailedInit bool `protobuf:"varint,15,opt,name=exit_on_failed_init,json=exitOnFailedInit,proto3" json:"exit_on_failed_init,omitempty"`
	// Maximum number of retry attempts for failed startup (default: 10)
	MaxInitRetries uint32 `protobuf:"varint,16,opt,name=max_init_retries,json=maxInitRetries,proto3" json:"max_init_retries,omitempty"`
	// Base backoff duration in milliseconds for startup retries (default: 3000ms)
	// Grows exponentially: 3s, 6s, 12s, 24s, etc.
	InitRetryBackoffBase uint64 `` /* 127-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Rule) Descriptor deprecated

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

Deprecated: Use Rule.ProtoReflect.Descriptor instead.

func (*Rule) GetColor

func (x *Rule) GetColor() string

func (*Rule) GetCommands

func (x *Rule) GetCommands() []string

func (*Rule) GetCycleProtection added in v0.0.51

func (x *Rule) GetCycleProtection() bool

func (*Rule) GetDebounceDelay

func (x *Rule) GetDebounceDelay() uint64

func (*Rule) GetDefaultAction

func (x *Rule) GetDefaultAction() string

func (*Rule) GetEnv

func (x *Rule) GetEnv() map[string]string

func (*Rule) GetExitOnFailedInit added in v0.0.53

func (x *Rule) GetExitOnFailedInit() bool

func (*Rule) GetInitRetryBackoffBase added in v0.0.53

func (x *Rule) GetInitRetryBackoffBase() uint64

func (*Rule) GetMaxInitRetries added in v0.0.53

func (x *Rule) GetMaxInitRetries() uint32

func (*Rule) GetName

func (x *Rule) GetName() string

func (*Rule) GetPrefix

func (x *Rule) GetPrefix() string

func (*Rule) GetProjectId

func (x *Rule) GetProjectId() string

func (*Rule) GetSkipRunOnInit

func (x *Rule) GetSkipRunOnInit() bool

func (*Rule) GetStatus

func (x *Rule) GetStatus() *RuleStatus

func (*Rule) GetVerbose

func (x *Rule) GetVerbose() bool

func (*Rule) GetWatch

func (x *Rule) GetWatch() []*RuleMatcher

func (*Rule) GetWorkDir

func (x *Rule) GetWorkDir() string

func (*Rule) ProtoMessage

func (*Rule) ProtoMessage()

func (*Rule) ProtoReflect

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

func (*Rule) Reset

func (x *Rule) Reset()

func (*Rule) String

func (x *Rule) String() string

type RuleMatcher

type RuleMatcher struct {

	// Patterns to match this rule for
	Patterns []string `protobuf:"bytes,1,rep,name=patterns,proto3" json:"patterns,omitempty"`
	// Action to take when rule matches - currently "include" | "exclude"
	Action string `protobuf:"bytes,2,opt,name=action,proto3" json:"action,omitempty"`
	// contains filtered or unexported fields
}

func (*RuleMatcher) Descriptor deprecated

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

Deprecated: Use RuleMatcher.ProtoReflect.Descriptor instead.

func (*RuleMatcher) GetAction

func (x *RuleMatcher) GetAction() string

func (*RuleMatcher) GetPatterns

func (x *RuleMatcher) GetPatterns() []string

func (*RuleMatcher) ProtoMessage

func (*RuleMatcher) ProtoMessage()

func (*RuleMatcher) ProtoReflect

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

func (*RuleMatcher) Reset

func (x *RuleMatcher) Reset()

func (*RuleMatcher) String

func (x *RuleMatcher) String() string

type RuleStatus

type RuleStatus struct {
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	RuleName  string `protobuf:"bytes,2,opt,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"`
	// Whether the rule is currently executing commands
	// true = commands are running, false = rule is idle
	IsRunning bool `protobuf:"varint,3,opt,name=is_running,json=isRunning,proto3" json:"is_running,omitempty"`
	// When the current execution started (Unix timestamp in milliseconds)
	// Only meaningful when is_running = true
	StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
	// When the last execution completed (Unix timestamp in milliseconds)
	// Use this to check how recently a rule was executed
	LastBuildTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=last_build_time,json=lastBuildTime,proto3" json:"last_build_time,omitempty"`
	// Result of the last execution. Possible values:
	// - "SUCCESS": All commands completed successfully (exit code 0)
	// - "FAILED": One or more commands failed (non-zero exit code)
	// - "RUNNING": Rule is currently executing
	// - "IDLE": Rule has not been executed yet
	LastBuildStatus string `protobuf:"bytes,6,opt,name=last_build_status,json=lastBuildStatus,proto3" json:"last_build_status,omitempty"`
	// contains filtered or unexported fields
}

RuleStatus represents the current execution status and history of a rule. Use this to monitor build/test progress and check for failures.

func (*RuleStatus) Descriptor deprecated

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

Deprecated: Use RuleStatus.ProtoReflect.Descriptor instead.

func (*RuleStatus) GetIsRunning

func (x *RuleStatus) GetIsRunning() bool

func (*RuleStatus) GetLastBuildStatus

func (x *RuleStatus) GetLastBuildStatus() string

func (*RuleStatus) GetLastBuildTime

func (x *RuleStatus) GetLastBuildTime() *timestamppb.Timestamp

func (*RuleStatus) GetProjectId

func (x *RuleStatus) GetProjectId() string

func (*RuleStatus) GetRuleName

func (x *RuleStatus) GetRuleName() string

func (*RuleStatus) GetStartTime

func (x *RuleStatus) GetStartTime() *timestamppb.Timestamp

func (*RuleStatus) ProtoMessage

func (*RuleStatus) ProtoMessage()

func (*RuleStatus) ProtoReflect

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

func (*RuleStatus) Reset

func (x *RuleStatus) Reset()

func (*RuleStatus) String

func (x *RuleStatus) String() string

type Settings

type Settings struct {
	ProjectId string `protobuf:"bytes,1,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// Whether to prefix logs with rule name or not
	PrefixLogs bool `protobuf:"varint,2,opt,name=prefix_logs,json=prefixLogs,proto3" json:"prefix_logs,omitempty"`
	// Length of the prefix to format in if prefixing logs.
	PrefixMaxLength uint32 `protobuf:"varint,3,opt,name=prefix_max_length,json=prefixMaxLength,proto3" json:"prefix_max_length,omitempty"`
	// Default debounce delay for all rules if they do not have their own DB delay specified
	DefaultDebounceDelay *uint64 `` /* 130-byte string literal not displayed */
	// Whether to log verbosely or not
	Verbose            bool              `protobuf:"varint,5,opt,name=verbose,proto3" json:"verbose,omitempty"`
	ColorLogs          bool              `protobuf:"varint,6,opt,name=color_logs,json=colorLogs,proto3" json:"color_logs,omitempty"`
	ColorScheme        string            `protobuf:"bytes,7,opt,name=color_scheme,json=colorScheme,proto3" json:"color_scheme,omitempty"`
	CustomColors       map[string]string `` /* 171-byte string literal not displayed */
	DefaultWatchAction string            `protobuf:"bytes,9,opt,name=default_watch_action,json=defaultWatchAction,proto3" json:"default_watch_action,omitempty"`
	// Cycle detection configuration
	CycleDetection *CycleDetectionSettings `protobuf:"bytes,10,opt,name=cycle_detection,json=cycleDetection,proto3" json:"cycle_detection,omitempty"`
	// contains filtered or unexported fields
}

Settings defines global settings for devloop.

func (*Settings) Descriptor deprecated

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

Deprecated: Use Settings.ProtoReflect.Descriptor instead.

func (*Settings) GetColorLogs

func (x *Settings) GetColorLogs() bool

func (*Settings) GetColorScheme

func (x *Settings) GetColorScheme() string

func (*Settings) GetCustomColors

func (x *Settings) GetCustomColors() map[string]string

func (*Settings) GetCycleDetection added in v0.0.51

func (x *Settings) GetCycleDetection() *CycleDetectionSettings

func (*Settings) GetDefaultDebounceDelay

func (x *Settings) GetDefaultDebounceDelay() uint64

func (*Settings) GetDefaultWatchAction

func (x *Settings) GetDefaultWatchAction() string

func (*Settings) GetPrefixLogs

func (x *Settings) GetPrefixLogs() bool

func (*Settings) GetPrefixMaxLength

func (x *Settings) GetPrefixMaxLength() uint32

func (*Settings) GetProjectId

func (x *Settings) GetProjectId() string

func (*Settings) GetVerbose

func (x *Settings) GetVerbose() bool

func (*Settings) ProtoMessage

func (*Settings) ProtoMessage()

func (*Settings) ProtoReflect

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

func (*Settings) Reset

func (x *Settings) Reset()

func (*Settings) String

func (x *Settings) String() string

type StreamLogsRequest

type StreamLogsRequest struct {
	RuleName string `protobuf:"bytes,1,opt,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"`
	Filter   string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
	// Timeout (in seconds) if no new log lines found to be streamed
	// negative value  => Wait indefinitely/forever
	// 0 => use a default value (say 3s)
	Timeout int64 `protobuf:"varint,3,opt,name=timeout,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamLogsRequest) Descriptor deprecated

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

Deprecated: Use StreamLogsRequest.ProtoReflect.Descriptor instead.

func (*StreamLogsRequest) GetFilter

func (x *StreamLogsRequest) GetFilter() string

func (*StreamLogsRequest) GetRuleName

func (x *StreamLogsRequest) GetRuleName() string

func (*StreamLogsRequest) GetTimeout

func (x *StreamLogsRequest) GetTimeout() int64

func (*StreamLogsRequest) ProtoMessage

func (*StreamLogsRequest) ProtoMessage()

func (*StreamLogsRequest) ProtoReflect

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

func (*StreamLogsRequest) Reset

func (x *StreamLogsRequest) Reset()

func (*StreamLogsRequest) String

func (x *StreamLogsRequest) String() string

type StreamLogsResponse

type StreamLogsResponse struct {
	Lines []*LogLine `protobuf:"bytes,1,rep,name=lines,proto3" json:"lines,omitempty"`
	// contains filtered or unexported fields
}

func (*StreamLogsResponse) Descriptor deprecated

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

Deprecated: Use StreamLogsResponse.ProtoReflect.Descriptor instead.

func (*StreamLogsResponse) GetLines

func (x *StreamLogsResponse) GetLines() []*LogLine

func (*StreamLogsResponse) ProtoMessage

func (*StreamLogsResponse) ProtoMessage()

func (*StreamLogsResponse) ProtoReflect

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

func (*StreamLogsResponse) Reset

func (x *StreamLogsResponse) Reset()

func (*StreamLogsResponse) String

func (x *StreamLogsResponse) String() string

type TriggerRuleRequest

type TriggerRuleRequest struct {

	// Required: The name of the rule to execute.
	// Must match a rule name from GetConfig() response (rules[].name).
	// Examples: "backend", "frontend", "tests", "build"
	RuleName string `protobuf:"bytes,1,opt,name=rule_name,json=ruleName,proto3" json:"rule_name,omitempty"`
	// contains filtered or unexported fields
}

TriggerRuleRequest starts execution of a specific rule.

func (*TriggerRuleRequest) Descriptor deprecated

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

Deprecated: Use TriggerRuleRequest.ProtoReflect.Descriptor instead.

func (*TriggerRuleRequest) GetRuleName

func (x *TriggerRuleRequest) GetRuleName() string

func (*TriggerRuleRequest) ProtoMessage

func (*TriggerRuleRequest) ProtoMessage()

func (*TriggerRuleRequest) ProtoReflect

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

func (*TriggerRuleRequest) Reset

func (x *TriggerRuleRequest) Reset()

func (*TriggerRuleRequest) String

func (x *TriggerRuleRequest) String() string

type TriggerRuleResponse

type TriggerRuleResponse struct {

	// Whether the trigger request was accepted and rule execution started.
	// true = rule is now running, false = trigger rejected
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// Human-readable message explaining the result.
	// Use GetRule() to monitor actual execution progress.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

TriggerRuleResponse indicates whether the rule trigger was accepted.

func (*TriggerRuleResponse) Descriptor deprecated

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

Deprecated: Use TriggerRuleResponse.ProtoReflect.Descriptor instead.

func (*TriggerRuleResponse) GetMessage

func (x *TriggerRuleResponse) GetMessage() string

func (*TriggerRuleResponse) GetSuccess

func (x *TriggerRuleResponse) GetSuccess() bool

func (*TriggerRuleResponse) ProtoMessage

func (*TriggerRuleResponse) ProtoMessage()

func (*TriggerRuleResponse) ProtoReflect

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

func (*TriggerRuleResponse) Reset

func (x *TriggerRuleResponse) Reset()

func (*TriggerRuleResponse) String

func (x *TriggerRuleResponse) String() string

type UnimplementedAgentServiceServer

type UnimplementedAgentServiceServer struct{}

UnimplementedAgentServiceServer should 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 (UnimplementedAgentServiceServer) GetConfig

func (UnimplementedAgentServiceServer) GetRule

func (UnimplementedAgentServiceServer) ListWatchedPaths

func (UnimplementedAgentServiceServer) TriggerRule

type UnsafeAgentServiceServer

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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