agentmanager

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) BroadcastCommand

func (r *Registry) BroadcastCommand(cmd *taskguildv1.AgentCommand)

BroadcastCommand sends a command to all connected agent-managers.

func (*Registry) BroadcastCommandToProject

func (r *Registry) BroadcastCommandToProject(projectName string, cmd *taskguildv1.AgentCommand)

BroadcastCommandToProject sends a command only to agent-managers whose projectName matches. Agents with an empty projectName (legacy) also receive the command.

func (*Registry) FindAvailable

func (r *Registry) FindAvailable() (string, bool)

FindAvailable returns the agent-manager ID with the least active tasks that still has capacity (activeTasks < maxConcurrentTasks). Returns ("", false) if no agent-manager is available.

func (*Registry) GetProjectName

func (r *Registry) GetProjectName(agentManagerID string) (string, bool)

GetProjectName returns the project name for a connected agent-manager.

func (*Registry) Register

func (r *Registry) Register(agentManagerID string, maxConcurrentTasks int32, projectName string) chan *taskguildv1.AgentCommand

func (*Registry) SendCommand

func (r *Registry) SendCommand(agentManagerID string, cmd *taskguildv1.AgentCommand) bool

SendCommand sends a command to a specific agent-manager. Returns false if not connected.

func (*Registry) Unregister

func (r *Registry) Unregister(agentManagerID string)

func (*Registry) UpdateHeartbeat

func (r *Registry) UpdateHeartbeat(agentManagerID string, activeTasks int32) bool

type Server

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

func NewServer

func NewServer(registry *Registry, taskRepo task.Repository, workflowRepo workflow.Repository, agentRepo agent.Repository, interactionRepo interaction.Repository, projectRepo project.Repository, skillRepo skill.Repository, scriptRepo script.Repository, taskLogRepo tasklog.Repository, permissionRepo permission.Repository, eventBus *eventbus.Bus, scriptBroker *script.ScriptExecutionBroker) *Server

func (*Server) GetScriptComparison added in v0.0.3

GetScriptComparison returns the cached script diffs for a project.

func (*Server) ReportScriptComparison added in v0.0.3

ReportScriptComparison receives comparison results from the agent and caches them.

func (*Server) RequestScriptComparison added in v0.0.3

RequestScriptComparison sends a CompareScriptsCommand to connected agent-managers so they compare local scripts with server versions.

func (*Server) RequestScriptExecution

func (s *Server) RequestScriptExecution(projectID string, sc *script.Script) (string, error)

RequestScriptExecution sends an ExecuteScriptCommand to connected agent-managers for the project and returns a request_id.

func (*Server) ResolveScriptConflict added in v0.0.3

ResolveScriptConflict resolves a single script conflict between server and agent versions.

Jump to

Keyboard shortcuts

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