getNamedAgent = (petName, type) => {
      if (petName !== undefined) {
        const id = petStore.identifyLocal(petName);
        if (id !== undefined) {
          return {
            id,
            value: provide(id, type),
          };
        }
      }
      return undefined;
    }
@template {'host' | 'guest' | 'agent'} T
@param {string} [petName] - The agent's potential pet name.
@param {T} [type]