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

Method handleSessionsStatus

internal/extension/host_api.go:994–1011  ·  view source on GitHub ↗
(ctx context.Context, raw json.RawMessage)

Source from the content-addressed store, hash-verified

992}
993
994func (h *HostAPIHandler) handleSessionsStatus(ctx context.Context, raw json.RawMessage) (any, error) {
995 var params hostAPISessionTargetParams
996 if err := decodeHostAPIParams(raw, &params); err != nil {
997 return nil, err
998 }
999 if h.sessions == nil {
1000 return nil, errors.New("extension: session manager is not configured")
1001 }
1002 if strings.TrimSpace(params.SessionID) == "" {
1003 return nil, invalidParamsRPCError(errors.New("session_id is required"))
1004 }
1005
1006 info, err := h.requireHostAPISessionWorkspace(ctx, params.WorkspaceID, params.SessionID)
1007 if err != nil {
1008 return nil, err
1009 }
1010 return hostAPISessionStatusFromInfo(info), nil
1011}
1012
1013func (h *HostAPIHandler) handleSessionsEvents(ctx context.Context, raw json.RawMessage) (any, error) {
1014 var params hostAPISessionEventsParams

Callers

nothing calls this directly

Calls 4

decodeHostAPIParamsFunction · 0.85
invalidParamsRPCErrorFunction · 0.85

Tested by

no test coverage detected