MCPcopy Create free account
hub / github.com/compozy/agh / handleTasksTree

Method handleTasksTree

internal/extension/host_api_tasks.go:94–114  ·  view source on GitHub ↗
(ctx context.Context, raw json.RawMessage)

Source from the content-addressed store, hash-verified

92}
93
94func (h *HostAPIHandler) handleTasksTree(ctx context.Context, raw json.RawMessage) (any, error) {
95 var params hostAPITaskTreeParams
96 if err := decodeHostAPIParams(raw, &params); err != nil {
97 return nil, err
98 }
99 taskID := strings.TrimSpace(params.ID)
100 if taskID == "" {
101 return nil, invalidParamsRPCError(errors.New("id is required"))
102 }
103
104 manager, actor, err := h.taskManagerAndActor(ctx)
105 if err != nil {
106 return nil, err
107 }
108
109 view, err := manager.Tree(ctx, taskID, actor)
110 if err != nil {
111 return nil, mapTaskRPCError(taskID, err)
112 }
113 return taskTreePayloadFromView(view), nil
114}
115
116func (h *HostAPIHandler) handleTasksDashboard(ctx context.Context, raw json.RawMessage) (any, error) {
117 var params hostAPITaskDashboardParams

Callers

nothing calls this directly

Calls 6

taskManagerAndActorMethod · 0.95
decodeHostAPIParamsFunction · 0.85
invalidParamsRPCErrorFunction · 0.85
mapTaskRPCErrorFunction · 0.85
taskTreePayloadFromViewFunction · 0.85
TreeMethod · 0.65

Tested by

no test coverage detected