infrastructure

package
v0.208.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShellTracker

func NewShellTracker(maxConcurrent int) *shellTracker

NewShellTracker creates a new shell tracker with the specified maximum concurrent shells. It returns the concrete type: callers that only need the tracked-shell surface assign it to a scheddomain.ShellTracker, while the shell housekeeping helpers (Cleanup/Count) stay reachable on the concrete for the background-shell service and this package's own tests.

func NewSubagentTracker

func NewSubagentTracker() scheddomain.SubagentTracker

NewSubagentTracker creates an empty subagent tracker.

Types

type A2ATaskTracker

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

A2ATaskTracker is the hierarchical (agent → context → task) scheddomain.A2ATaskTracker.

func NewA2ATaskTracker

func NewA2ATaskTracker() *A2ATaskTracker

NewA2ATaskTracker creates a new A2ATaskTracker. Returns the concrete type so callers that need to embed it (e.g. the unified services.BackgroundTaskRegistry) don't need to type-assert. The result still satisfies scheddomain.A2ATaskTracker via interface conversion.

func (*A2ATaskTracker) AddTask

func (t *A2ATaskTracker) AddTask(contextID, taskID string)

AddTask adds a server-generated task ID to a context

func (*A2ATaskTracker) ClearAllAgents

func (t *A2ATaskTracker) ClearAllAgents()

ClearAllAgents clears all tracked agents, contexts, tasks, and polling states

func (*A2ATaskTracker) GetAgentForContext

func (t *A2ATaskTracker) GetAgentForContext(contextID string) string

GetAgentForContext returns the agent URL for a given context ID

func (*A2ATaskTracker) GetAllAgents

func (t *A2ATaskTracker) GetAllAgents() []string

GetAllAgents returns all agent URLs being tracked

func (*A2ATaskTracker) GetAllContexts

func (t *A2ATaskTracker) GetAllContexts() []string

GetAllContexts returns all context IDs being tracked

func (*A2ATaskTracker) GetContextForTask

func (t *A2ATaskTracker) GetContextForTask(taskID string) string

GetContextForTask returns the context ID for a given task

func (*A2ATaskTracker) GetContextsForAgent

func (t *A2ATaskTracker) GetContextsForAgent(agentURL string) []string

GetContextsForAgent returns all context IDs for a specific agent

func (*A2ATaskTracker) GetLatestContextForAgent

func (t *A2ATaskTracker) GetLatestContextForAgent(agentURL string) string

GetLatestContextForAgent returns the most recently registered context for an agent

func (*A2ATaskTracker) GetLatestTaskForContext

func (t *A2ATaskTracker) GetLatestTaskForContext(contextID string) string

GetLatestTaskForContext returns the most recently added task for a context

func (*A2ATaskTracker) GetPollingState

func (t *A2ATaskTracker) GetPollingState(taskID string) *scheddomain.TaskPollingState

GetPollingState returns the current polling state for a task

func (*A2ATaskTracker) GetPollingTasksForContext

func (t *A2ATaskTracker) GetPollingTasksForContext(contextID string) []string

GetPollingTasksForContext returns all task IDs that are currently being polled for a context

func (*A2ATaskTracker) GetTasksForContext

func (t *A2ATaskTracker) GetTasksForContext(contextID string) []string

GetTasksForContext returns all task IDs for a specific context

func (*A2ATaskTracker) HasContext

func (t *A2ATaskTracker) HasContext(contextID string) bool

HasContext checks if a context ID is registered

func (*A2ATaskTracker) HasTask

func (t *A2ATaskTracker) HasTask(taskID string) bool

HasTask checks if a task ID exists

func (*A2ATaskTracker) RegisterContext

func (t *A2ATaskTracker) RegisterContext(agentURL, contextID string)

RegisterContext registers a server-generated context ID for an agent

func (*A2ATaskTracker) RemoveContext

func (t *A2ATaskTracker) RemoveContext(contextID string)

RemoveContext removes a context and all its tasks

func (*A2ATaskTracker) RemoveTask

func (t *A2ATaskTracker) RemoveTask(taskID string)

RemoveTask removes a task from its context

func (*A2ATaskTracker) StartPolling

func (t *A2ATaskTracker) StartPolling(taskID string, state *scheddomain.TaskPollingState)

StartPolling starts tracking a background polling operation for a task

func (*A2ATaskTracker) StopPolling

func (t *A2ATaskTracker) StopPolling(taskID string)

StopPolling stops and clears the polling state for a task

Jump to

Keyboard shortcuts

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