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

Method handleTasksInbox

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

Source from the content-addressed store, hash-verified

136}
137
138func (h *HostAPIHandler) handleTasksInbox(ctx context.Context, raw json.RawMessage) (any, error) {
139 var params hostAPITaskInboxParams
140 if err := decodeHostAPIParams(raw, &params); err != nil {
141 return nil, err
142 }
143
144 observer, err := h.taskObserver()
145 if err != nil {
146 return nil, err
147 }
148 actor, err := h.taskActorContext(ctx)
149 if err != nil {
150 return nil, fmt.Errorf("extension: derive task actor context: %w", err)
151 }
152 query, err := h.taskInboxQueryFromParams(ctx, params)
153 if err != nil {
154 return nil, err
155 }
156
157 view, err := observer.QueryTaskInbox(ctx, query, actor.Actor)
158 if err != nil {
159 return nil, mapTaskRPCError("", err)
160 }
161 return taskInboxPayloadFromView(view), nil
162}
163
164func (h *HostAPIHandler) handleTasksCreate(ctx context.Context, raw json.RawMessage) (any, error) {
165 var params hostAPITaskCreateParams

Callers

nothing calls this directly

Calls 7

taskObserverMethod · 0.95
taskActorContextMethod · 0.95
decodeHostAPIParamsFunction · 0.85
mapTaskRPCErrorFunction · 0.85
taskInboxPayloadFromViewFunction · 0.85
QueryTaskInboxMethod · 0.65

Tested by

no test coverage detected