Documentation
¶
Index ¶
- type AgentConfig
- type HookActionType
- type HookTrigger
- type Repository
- type Server
- func (s *Server) CreateWorkflow(ctx context.Context, req *connect.Request[taskguildv1.CreateWorkflowRequest]) (*connect.Response[taskguildv1.CreateWorkflowResponse], error)
- func (s *Server) DeleteWorkflow(ctx context.Context, req *connect.Request[taskguildv1.DeleteWorkflowRequest]) (*connect.Response[taskguildv1.DeleteWorkflowResponse], error)
- func (s *Server) GetWorkflow(ctx context.Context, req *connect.Request[taskguildv1.GetWorkflowRequest]) (*connect.Response[taskguildv1.GetWorkflowResponse], error)
- func (s *Server) ListWorkflows(ctx context.Context, req *connect.Request[taskguildv1.ListWorkflowsRequest]) (*connect.Response[taskguildv1.ListWorkflowsResponse], error)
- func (s *Server) UpdateWorkflow(ctx context.Context, req *connect.Request[taskguildv1.UpdateWorkflowRequest]) (*connect.Response[taskguildv1.UpdateWorkflowResponse], error)
- type Status
- type StatusHook
- type Workflow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentConfig ¶
type HookActionType ¶
type HookActionType string
const ( HookActionTypeUnspecified HookActionType = "" HookActionTypeSkill HookActionType = "skill" HookActionTypeScript HookActionType = "script" )
type HookTrigger ¶
type HookTrigger string
const ( HookTriggerUnspecified HookTrigger = "" HookTriggerBeforeTaskExecution HookTrigger = "before_task_execution" HookTriggerAfterTaskExecution HookTrigger = "after_task_execution" HookTriggerAfterWorktreeCreation HookTrigger = "after_worktree_creation" )
type Repository ¶
type Repository interface {
Create(ctx context.Context, w *Workflow) error
Get(ctx context.Context, id string) (*Workflow, error)
List(ctx context.Context, projectID string, limit, offset int) ([]*Workflow, int, error)
Update(ctx context.Context, w *Workflow) error
Delete(ctx context.Context, id string) error
}
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(repo Repository) *Server
func (*Server) CreateWorkflow ¶
func (s *Server) CreateWorkflow(ctx context.Context, req *connect.Request[taskguildv1.CreateWorkflowRequest]) (*connect.Response[taskguildv1.CreateWorkflowResponse], error)
func (*Server) DeleteWorkflow ¶
func (s *Server) DeleteWorkflow(ctx context.Context, req *connect.Request[taskguildv1.DeleteWorkflowRequest]) (*connect.Response[taskguildv1.DeleteWorkflowResponse], error)
func (*Server) GetWorkflow ¶
func (s *Server) GetWorkflow(ctx context.Context, req *connect.Request[taskguildv1.GetWorkflowRequest]) (*connect.Response[taskguildv1.GetWorkflowResponse], error)
func (*Server) ListWorkflows ¶
func (s *Server) ListWorkflows(ctx context.Context, req *connect.Request[taskguildv1.ListWorkflowsRequest]) (*connect.Response[taskguildv1.ListWorkflowsResponse], error)
func (*Server) UpdateWorkflow ¶
func (s *Server) UpdateWorkflow(ctx context.Context, req *connect.Request[taskguildv1.UpdateWorkflowRequest]) (*connect.Response[taskguildv1.UpdateWorkflowResponse], error)
type Status ¶
type Status struct {
Name string `yaml:"name"`
Order int32 `yaml:"order"`
IsInitial bool `yaml:"is_initial"`
IsTerminal bool `yaml:"is_terminal"`
TransitionsTo []string `yaml:"transitions_to"`
AgentID string `yaml:"agent_id,omitempty"`
Hooks []StatusHook `yaml:"hooks,omitempty"`
// EnableAgentMDHarness controls whether a background AGENT.md review
// harness runs when a task exits this status. Default is true (enabled).
EnableAgentMDHarness bool `yaml:"enable_agent_md_harness"`
AgentMDHarnessExplicitlyDisabled bool `yaml:"agent_md_harness_explicitly_disabled,omitempty"`
// PermissionMode for agents executing tasks in this status.
PermissionMode string `yaml:"permission_mode,omitempty"`
}
type StatusHook ¶
type StatusHook struct {
ID string `yaml:"id"`
SkillID string `yaml:"skill_id"`
Trigger HookTrigger `yaml:"trigger"`
Order int32 `yaml:"order"`
Name string `yaml:"name"`
ActionType HookActionType `yaml:"action_type,omitempty"`
ActionID string `yaml:"action_id,omitempty"`
}
type Workflow ¶
type Workflow struct {
ID string `yaml:"id"`
ProjectID string `yaml:"project_id"`
Name string `yaml:"name"`
Description string `yaml:"description"`
Statuses []Status `yaml:"statuses"`
AgentConfigs []AgentConfig `yaml:"agent_configs"`
CreatedAt time.Time `yaml:"created_at"`
UpdatedAt time.Time `yaml:"updated_at"`
// Task defaults
DefaultPermissionMode string `yaml:"default_permission_mode"`
DefaultUseWorktree bool `yaml:"default_use_worktree"`
// Custom prompt prepended to agent instructions for tasks in this workflow
CustomPrompt string `yaml:"custom_prompt"`
}
func (*Workflow) FindAgentIDForStatus ¶
FindAgentIDForStatus returns the agent ID configured for the given status. It first checks the status-level AgentID field, then falls back to the legacy AgentConfig list on the workflow. Returns "" if no agent is configured.
Click to show internal directories.
Click to hide internal directories.